summaryrefslogtreecommitdiff
path: root/tools/docs/crypto/crypto_docs.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-04-18 14:27:38 +0100
committerTobias Thierer <tobiast@google.com>2017-04-20 15:01:10 +0100
commitae3464f242b16d14a31e98df52659adebc1a1322 (patch)
tree55e31ef434412f0fe99dc9049aad3a5c2cb7784b /tools/docs/crypto/crypto_docs.py
parentdecb673fdbd066ae760a77da00684d3e5b0f07f0 (diff)
Deflake OldThreadGroupTest.
This test temporarily runs background threads, then makes assertions about the ThreadGroup's threads, such as that they are the same initially as after the temporary threads have been killed. Before this CL, the ThreadGroup hosting those background threads, initialThreadGroup, was the current (test runner) thread's ThreadGroup. This made the test depend on the inappropriate assumption that threads would not start or stop in that ThreadGroup during the test runtime. Therefore, the test was flaky. This CL moves initialThreadGroup to be a child of the test runner's ThreadGroup, isolating the test from any unrelated threads that may be starting or stopping while the test is running, eliminating this source of flakiness. The test also asserts that an unrelated thread remains in the initialThreadGroup throughout the test. It used to use the current (test runner) thread for this; since initialThreadGroup has changed to no longer contain that thread, this CL introduces a separate thread, initialThread, that runs for the entire time from setUp() until tearDown(). Because the ThreadGroup(String) constructor, which constructs a ThreadGroup whose parent ThreadGroup is that of the current thread, was no longer exercised by the changed code, this CL also adds a new separate test method, test_getParent(). Some unrelated dead code in the test was not addressed as part of this CL. Bug: 22106064 Test: make cts && cts-tradefed run cts -m CtsLibcoreTestCases \ -t libcore.java.lang.OldThreadGroupTest Change-Id: I1288987a1313eb0ff70a4f6b6022e06422b0fd6f
Diffstat (limited to 'tools/docs/crypto/crypto_docs.py')
0 files changed, 0 insertions, 0 deletions