Index: runtime/vm/object_graph_test.cc |
diff --git a/runtime/vm/object_graph_test.cc b/runtime/vm/object_graph_test.cc |
index 66771dbd564d056d4fa421cb35e80d1be9ae5160..00f77685bbc6256b1cebd6cafc6270432cc4b515 100644 |
--- a/runtime/vm/object_graph_test.cc |
+++ b/runtime/vm/object_graph_test.cc |
@@ -112,6 +112,8 @@ TEST_CASE(ObjectGraph) { |
{ |
HANDLESCOPE(isolate); |
Array& path = Array::Handle(Array::New(6, Heap::kNew)); |
+ // Trigger a full GC to increase probability of concurrent tasks. |
+ isolate->heap()->CollectAllGarbage(); |
intptr_t length = graph.RetainingPath(&c, path); |
EXPECT_LE(3, length); |
Array& expected_c = Array::Handle(); |