)]}' { "commit": "ae3464f242b16d14a31e98df52659adebc1a1322", "tree": "55e31ef434412f0fe99dc9049aad3a5c2cb7784b", "parents": [ "decb673fdbd066ae760a77da00684d3e5b0f07f0" ], "author": { "name": "Tobias Thierer", "email": "tobiast@google.com", "time": "Tue Apr 18 14:27:38 2017 +0100" }, "committer": { "name": "Tobias Thierer", "email": "tobiast@google.com", "time": "Thu Apr 20 15:01:10 2017 +0100" }, "message": "Deflake OldThreadGroupTest.\n\nThis test temporarily runs background threads, then makes assertions\nabout the ThreadGroup\u0027s threads, such as that they are the same\ninitially as after the temporary threads have been killed.\n\nBefore this CL, the ThreadGroup hosting those background threads,\ninitialThreadGroup, was the current (test runner) thread\u0027s ThreadGroup.\nThis made the test depend on the inappropriate assumption that threads\nwould not start or stop in that ThreadGroup during the test runtime.\nTherefore, the test was flaky.\n\nThis CL moves initialThreadGroup to be a child of the test runner\u0027s\nThreadGroup, isolating the test from any unrelated threads that may\nbe starting or stopping while the test is running, eliminating this\nsource of flakiness.\n\nThe test also asserts that an unrelated thread remains in the\ninitialThreadGroup throughout the test. It used to use the current\n(test runner) thread for this; since initialThreadGroup has changed\nto no longer contain that thread, this CL introduces a separate thread,\ninitialThread, that runs for the entire time from setUp() until\ntearDown().\n\nBecause the ThreadGroup(String) constructor, which constructs a\nThreadGroup whose parent ThreadGroup is that of the current thread,\nwas no longer exercised by the changed code, this CL also adds a\nnew separate test method, test_getParent().\n\nSome unrelated dead code in the test was not addressed as part of\nthis CL.\n\nBug: 22106064\nTest: make cts \u0026\u0026 cts-tradefed run cts -m CtsLibcoreTestCases \\\n -t libcore.java.lang.OldThreadGroupTest\n\nChange-Id: I1288987a1313eb0ff70a4f6b6022e06422b0fd6f\n", "tree_diff": [ { "type": "modify", "old_id": "206fdce7973654b58d6d0188a1aa0ad1643916b6", "old_mode": 33188, "old_path": "luni/src/test/java/libcore/java/lang/OldThreadGroupTest.java", "new_id": "35e366ef83584adf57a2d381b0bcd3ffd9af7666", "new_mode": 33188, "new_path": "luni/src/test/java/libcore/java/lang/OldThreadGroupTest.java" } ] }