Skip to content

Commit bcf3e62

Browse files
committed
Updated metrics integration tests for JVM 21
1 parent b30666c commit bcf3e62

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/it/java/io/deephaven/benchmark/tests/internal/metrics/MetricsCollectionTest.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
import org.junit.jupiter.api.*;
88
import io.deephaven.benchmark.api.Bench;
99

10+
/**
11+
* Test to see what metrics are available in the remote Deephaven Server. Note. These tests should pass when DH is
12+
* either JVM 17 or JVM 21
13+
*/
1014
public class MetricsCollectionTest {
1115
final Bench api = Bench.create(this);
1216

@@ -23,7 +27,8 @@ public void collect1MetricSet() {
2327
api.query(query).fetchAfter("mymetrics", table -> {
2428
assertEquals("timestamp, origin, category, type, name, value, note", formatCols(table.getColumnNames()),
2529
"Wrong column names");
26-
assertEquals(21, table.getRowCount(), "Wrong row count");
30+
int rowCount = table.getRowCount();
31+
assertTrue(rowCount == 21 || rowCount == 23, "Wrong row count. Got " + rowCount);
2732
assertEquals("ClassLoadingImpl", table.getValue(0, "category"), "Wrong bean name");
2833
assertEquals("TotalLoadedClassCount", table.getValue(0, "name"), "Wrong ");
2934
assertTrue(table.getValue(3, "value").toString()
@@ -45,7 +50,8 @@ public void collect2MetricSets() {
4550
api.query(query).fetchAfter("mymetrics", table -> {
4651
assertEquals("timestamp, origin, category, type, name, value, note", formatCols(table.getColumnNames()),
4752
"Wrong column names");
48-
assertEquals(42, table.getRowCount(), "Wrong row count");
53+
int rowCount = table.getRowCount();
54+
assertTrue(rowCount == 42 || rowCount == 46, "Wrong row count. Got " + rowCount);
4955
}).execute();
5056
}
5157

@@ -60,7 +66,8 @@ public void collectMetricsToFile() throws Exception {
6066
""";
6167

6268
api.query(query).fetchAfter("mymetrics", table -> {
63-
assertEquals(21, table.getRowCount(), "Wrong row count");
69+
int rowCount = table.getRowCount();
70+
assertTrue(rowCount == 21 || rowCount == 23, "Wrong row count. Got " + rowCount);
6471
api.metrics().add(table);
6572
}).execute();
6673
api.close();

0 commit comments

Comments
 (0)