From c29f7f3a5fc43018b10bba5146e3524c7466b4d6 Mon Sep 17 00:00:00 2001 From: "tommi@webrtc.org" Date: Sat, 14 Mar 2015 18:15:23 +0000 Subject: [PATCH] Disable assert for nr of threads in PeerConnectionTest.java. This test is flaky so we need to figure out a better way to do it. I've documented what we've observed and added a todo for myself to figure out a solution. R=kjellander@webrtc.org BUG=4424 Review URL: https://webrtc-codereview.appspot.com/46599004 Cr-Commit-Position: refs/heads/master@{#8725} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8725 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../src/org/webrtc/PeerConnectionTest.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java b/talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java index 4e364b5a4a..c9dc9a2d1b 100644 --- a/talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java +++ b/talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java @@ -480,9 +480,19 @@ public class PeerConnectionTest { } void finalizeThreadCheck() throws Exception { - TreeSet threadsAfterTest = allThreads(); - assertEquals(threadsBeforeTest, threadsAfterTest); - Thread.sleep(100); + // TreeSet threadsAfterTest = allThreads(); + + // TODO(tommi): Figure out a more reliable way to do this test. As is + // we're seeing three possible 'normal' situations: + // 1. before and after sets are equal. + // 2. before contains 3 threads that do not exist in after. + // 3. after contains 3 threads that do not exist in before. + // + // Maybe it would be better to do the thread enumeration from C++ and get + // the thread names as well, in order to determine what these 3 threads are. + + // assertEquals(threadsBeforeTest, threadsAfterTest); + // Thread.sleep(100); } void doTest() throws Exception {