From 4db31cfb946d907661a55815baf4a19ceba0ae99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 9 Aug 2014 14:23:18 +0200 Subject: [PATCH] Remove test that can not guarantee its success. --- .../sone/core/WebOfTrustUpdaterTest.java | 25 ---------------------- 1 file changed, 25 deletions(-) diff --git a/src/test/java/net/pterodactylus/sone/core/WebOfTrustUpdaterTest.java b/src/test/java/net/pterodactylus/sone/core/WebOfTrustUpdaterTest.java index 2caecf8..a493923 100644 --- a/src/test/java/net/pterodactylus/sone/core/WebOfTrustUpdaterTest.java +++ b/src/test/java/net/pterodactylus/sone/core/WebOfTrustUpdaterTest.java @@ -15,7 +15,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.atomic.AtomicInteger; import net.pterodactylus.sone.core.WebOfTrustUpdaterImpl.AddContextJob; import net.pterodactylus.sone.core.WebOfTrustUpdaterImpl.RemoveContextJob; @@ -364,30 +363,6 @@ public class WebOfTrustUpdaterTest { } @Test - public void multipleCallsToAddContextAreCollapsed() throws InterruptedException, PluginException { - final AtomicInteger errorCount = new AtomicInteger(); - final CountDownLatch addContextsFinished = new CountDownLatch(2); - for (int i = 1; i <= 2; i++) { - /* this is so fucking volatile. */ - if (i > 1) { - sleep(200); - } - new Thread(new Runnable() { - public void run() { - if (!webOfTrustUpdater.addContextWait(ownIdentity, CONTEXT)) { - errorCount.incrementAndGet(); - } - addContextsFinished.countDown(); - } - }).start(); - } - webOfTrustUpdater.start(); - assertThat(addContextsFinished.await(1, SECONDS), is(true)); - verify(ownIdentity).addContext(eq(CONTEXT)); - assertThat(errorCount.get(), is(0)); - } - - @Test public void removeContextRemovesAContext() throws InterruptedException, PluginException { webOfTrustUpdater.start(); final CountDownLatch removeContextTrigger = new CountDownLatch(1); -- 2.7.4