From 35f374c03e27748b52f68f0f81b73d824f5ee47d Mon Sep 17 00:00:00 2001 From: "Maxim.Zaytsev" Date: Thu, 26 Jul 2018 00:56:45 +0300 Subject: [PATCH] fix many seeders test. Need better test logic --- .../java/com/turn/ttorrent/CommunicationManagerFactory.java | 2 +- .../com/turn/ttorrent/client/CommunicationManagerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/test/java/com/turn/ttorrent/CommunicationManagerFactory.java b/tests/src/test/java/com/turn/ttorrent/CommunicationManagerFactory.java index 391b53aca..ed4be2948 100644 --- a/tests/src/test/java/com/turn/ttorrent/CommunicationManagerFactory.java +++ b/tests/src/test/java/com/turn/ttorrent/CommunicationManagerFactory.java @@ -16,7 +16,7 @@ public CommunicationManager getClient(String name) { final ExecutorService executorService = new ThreadPoolExecutor( DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE, 0L, TimeUnit.MILLISECONDS, - new LinkedBlockingQueue(2000)); + new LinkedBlockingQueue(4000)); final ExecutorService pieceValidatorExecutor = new ThreadPoolExecutor( DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE, 0L, TimeUnit.MILLISECONDS, diff --git a/tests/src/test/java/com/turn/ttorrent/client/CommunicationManagerTest.java b/tests/src/test/java/com/turn/ttorrent/client/CommunicationManagerTest.java index 2a9f71960..e01d385c6 100644 --- a/tests/src/test/java/com/turn/ttorrent/client/CommunicationManagerTest.java +++ b/tests/src/test/java/com/turn/ttorrent/client/CommunicationManagerTest.java @@ -1284,8 +1284,8 @@ protected boolean condition() { } public void testManySeeders() throws Exception { - File artifact = tempFiles.createTempFile(1024 * 1024 * 1024); - int seedersCount = 30; + File artifact = tempFiles.createTempFile(256 * 1024 * 1024); + int seedersCount = 15; TorrentMetadata torrent = TorrentCreator.create(artifact, this.tracker.getAnnounceURI(), "test"); File torrentFile = tempFiles.createTempFile(); saveTorrent(torrent, torrentFile);