diff options
author | 2025-01-22 19:39:22 +0000 | |
---|---|---|
committer | 2025-01-22 13:09:26 -0800 | |
commit | b0af4d2bc412e5509232c3bb3db602cbe30a285b (patch) | |
tree | bde7374fb8b66d42e836c6d676e048f250f39e13 | |
parent | 401c400b4c53849a66cc12fc0e039814fb57c4c2 (diff) |
Disable GCMetric.GCDuration and GCDurationDelta gtests
The GC invoked before asserting that the two metrics are non-zero are
too small. We need to make them consume more time. Otherwise there is
always a possiblity that the GCs take less than a millisecond and hence
the tests fail.
Bug: 391531096
Bug: 343220989
Test: atest art_standalone_runtime_tests:art_standalone_runtime_tests.HeapTest#GCMetrics -- --abi x86_64
Change-Id: I0c3220b57a16fc85429c493c62c5932ac97ea854
-rw-r--r-- | runtime/gc/heap_test.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc index 18e91da75d..74d2970c0d 100644 --- a/runtime/gc/heap_test.cc +++ b/runtime/gc/heap_test.cc @@ -190,7 +190,7 @@ TEST_F(HeapTest, GCMetrics) { // young-generation collections) is null (b/271112044). Temporarily // suspend the following checks while we investigate. // - // TODO(b/271112044): Investigate and adjust these expectations and/or the + // TODO(b/271990567): Investigate and adjust these expectations and/or the // corresponding metric logic. #if 0 EXPECT_PRED2(AnyIsFalse, full_gc_duration->IsNull(), young_gc_duration->IsNull()); @@ -209,8 +209,15 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_FALSE(full_gc_scanned_bytes_delta->IsNull()); EXPECT_FALSE(full_gc_freed_bytes->IsNull()); EXPECT_FALSE(full_gc_freed_bytes_delta->IsNull()); + // Like the generational case, these GC duration can be less than a + // millisecond here as well (b/391531096). Temporarily disabling the + // tests. + // TODO(b/271990567): Possibly make the GCs above more time consuming to + // avoid the situation. +#if 0 EXPECT_FALSE(full_gc_duration->IsNull()); EXPECT_FALSE(full_gc_duration_delta->IsNull()); +#endif EXPECT_TRUE(young_gc_collection_time->IsNull()); EXPECT_TRUE(young_gc_count->IsNull()); |