Skip to content

Commit 17a7512

Browse files
committed
IGNITE-28428 Fix flaky PerformanceStatisticsPrinterTest#testSystemViewOperationFilter
1 parent d24b2a3 commit 17a7512

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

modules/performance-statistics-ext/src/test/java/org/apache/ignite/internal/performancestatistics/PerformanceStatisticsPrinterTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.junit.Test;
5555

5656
import static java.util.stream.Collectors.joining;
57+
import static org.apache.ignite.internal.processors.performancestatistics.AbstractPerformanceStatisticsTest.waitForStatisticsEnabled;
5758
import static org.apache.ignite.internal.processors.performancestatistics.FilePerformanceStatisticsWriter.PERF_STAT_DIR;
5859
import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_GET;
5960
import static org.apache.ignite.internal.processors.performancestatistics.OperationType.CACHE_PUT;
@@ -154,6 +155,8 @@ public void testSystemViewOperationFilter() throws Exception {
154155

155156
ign.context().performanceStatistics().startCollectStatistics();
156157

158+
waitForStatisticsEnabled(true);
159+
157160
myCache.put("key", 1);
158161

159162
myCache.query(new ScanQuery<>((key, val) -> true)).getAll();
@@ -163,6 +166,8 @@ public void testSystemViewOperationFilter() throws Exception {
163166
assertTrue("Performance statistics writer did not finish.", waitForCondition(lsnr::check, TIMEOUT));
164167

165168
ign.context().performanceStatistics().stopCollectStatistics();
169+
170+
waitForStatisticsEnabled(false);
166171
}
167172

168173
List<OperationType> expOps = F.asList(CACHE_START, CACHE_START, QUERY_PROPERTY, QUERY_PROPERTY, QUERY);

modules/performance-statistics-ext/src/test/java/org/apache/ignite/internal/performancestatistics/PerformanceStatisticsReportSelfTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import org.jetbrains.annotations.Nullable;
6666
import org.junit.Test;
6767

68-
import static java.lang.System.exit;
6968
import static java.util.Collections.singletonMap;
7069
import static org.apache.ignite.cache.query.IndexQueryCriteriaBuilder.gt;
7170
import static org.apache.ignite.internal.processors.performancestatistics.AbstractPerformanceStatisticsTest.waitForStatisticsEnabled;

0 commit comments

Comments
 (0)