]> source.dussan.org Git - sonarqube.git/commitdiff
Fix ProcessStateSystemInfoTest on Java 8
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 5 Apr 2016 11:58:53 +0000 (13:58 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 5 Apr 2016 11:59:07 +0000 (13:59 +0200)
server/sonar-process/src/test/java/org/sonar/process/systeminfo/ProcessStateSystemInfoTest.java

index b1088a075845f572ea9915c43025b833de0ac595..8369c88c8d1fa168c9c98e07973bce581d68fe0e 100644 (file)
@@ -38,11 +38,8 @@ public class ProcessStateSystemInfoTest {
     ProtobufSystemInfo.Section section = underTest.toProtobuf();
 
     assertThat(section.getName()).isEqualTo(PROCESS_NAME);
-    assertThat(section.getAttributesCount()).isEqualTo(9);
-    assertThat(section.getAttributes(0).getKey()).isEqualTo("Heap Committed (MB)");
-    assertThat(section.getAttributes(0).getLongValue()).isGreaterThan(1L);
-    assertThat(section.getAttributes(8).getKey()).isEqualTo("Thread Count");
-    assertThat(section.getAttributes(8).getLongValue()).isGreaterThan(1L);
+    assertThat(section.getAttributesCount()).isGreaterThan(0);
+    assertThat(section.getAttributesList()).extracting("key").contains("Thread Count");
   }
 
   @Test