Permalink
Browse files

BOOKKEEPER-523: Every test should have a timeout (ivank, sijie via fpj)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk@1426772 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent ea36e59 commit 7b2b91579000bc99d6fdded3aefb349975058c6f @fpj fpj committed Dec 29, 2012
Showing with 287 additions and 285 deletions.
  1. +2 −0 CHANGES.txt
  2. +3 −3 bookkeeper-benchmark/src/test/java/org/apache/bookkeeper/benchmark/TestBenchmark.java
  3. +11 −11 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
  4. +5 −5 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CompactionTest.java
  5. +10 −10 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CookieTest.java
  6. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CreateNewLogTest.java
  7. +4 −4 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
  8. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestLedgerDirsManager.java
  9. +4 −4 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/UpgradeTest.java
  10. +4 −4 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java
  11. +11 −11 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
  12. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieWriteLedgerTest.java
  13. +6 −6 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerRecoveryTest.java
  14. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/RoundRobinDistributionScheduleTest.java
  15. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/SlowBookieTest.java
  16. +6 −6 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java
  17. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerChecker.java
  18. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerFragmentReplication.java
  19. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestReadTimeout.java
  20. +4 −4 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestSpeculativeRead.java
  21. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/GcLedgersTest.java
  22. +5 −5 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/LedgerLayoutTest.java
  23. +5 −5 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/TestLedgerManager.java
  24. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/TestZkVersion.java
  25. +5 −5 bookkeeper-server/src/test/java/org/apache/bookkeeper/metastore/TestMetaStore.java
  26. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
  27. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
  28. +6 −6 bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
  29. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorLedgerCheckerTest.java
  30. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/BookieLedgerIndexTest.java
  31. +9 −9 ...per-server/src/test/java/org/apache/bookkeeper/replication/TestLedgerUnderreplicationManager.java
  32. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/AsyncLedgerOpsTest.java
  33. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
  34. +8 −8 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
  35. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
  36. +13 −13 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
  37. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java
  38. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/CloseTest.java
  39. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
  40. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConditionalSetTest.java
  41. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConfigurationTest.java
  42. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/IndexCorruptionTest.java
  43. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerCreateDeleteTest.java
  44. +2 −2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerDeleteTest.java
  45. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/NIOServerFactoryTest.java
  46. +3 −3 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/TestBackwardCompat.java
  47. +1 −1 bookkeeper-server/src/test/java/org/apache/bookkeeper/util/TestDiskChecker.java
  48. +1 −1 hedwig-client/src/test/java/org/apache/hedwig/util/TestFileUtils.java
  49. +8 −8 hedwig-client/src/test/java/org/apache/hedwig/util/TestHedwigSocketAddress.java
  50. +2 −2 hedwig-client/src/test/java/org/apache/hedwig/util/TestPathUtils.java
  51. +16 −16 hedwig-server/src/test/java/org/apache/hedwig/client/TestPubSubClient.java
  52. +3 −3 hedwig-server/src/test/java/org/apache/hedwig/client/netty/TestMultiplexing.java
  53. +6 −6 hedwig-server/src/test/java/org/apache/hedwig/server/TestBackwardCompat.java
  54. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/TestPubSubServerStartup.java
  55. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestThrottlingDelivery.java
  56. +9 −9 hedwig-server/src/test/java/org/apache/hedwig/server/filter/TestMessageFilter.java
  57. +3 −3 hedwig-server/src/test/java/org/apache/hedwig/server/handlers/TestBaseHandler.java
  58. +2 −2 hedwig-server/src/test/java/org/apache/hedwig/server/handlers/TestSubUnsubHandler.java
  59. +3 −3 hedwig-server/src/test/java/org/apache/hedwig/server/integration/TestHedwigRegion.java
  60. +2 −2 hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
  61. +3 −3 hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManager.java
  62. +4 −4 hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
  63. +5 −5 hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestPubSubServer.java
  64. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
  65. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
  66. +4 −4 hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
  67. +9 −9 ...g-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
  68. +5 −5 .../src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
  69. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
  70. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
  71. +9 −9 hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
  72. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestMMSubscriptionManager.java
  73. +2 −2 hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
  74. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
  75. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestHubInfo.java
  76. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestHubLoad.java
  77. +5 −5 hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
  78. +5 −5 hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
  79. +1 −1 hedwig-server/src/test/java/org/apache/hedwig/zookeeper/TestZkUtils.java
View
2 CHANGES.txt
@@ -219,6 +219,8 @@ Trunk (unreleased changes)
BOOKKEEPER-495: Revise BK config doc (fpj, ivank via fpj)
+ BOOKKEEPER-523: Every test should have a timeout (ivank, sijie via fpj)
+
bookkeeper-server:
BOOKKEEPER-328: Bookie DeathWatcher is missing thread name (Rakesh via sijie)
View
6 bookkeeper-benchmark/src/test/java/org/apache/bookkeeper/benchmark/TestBenchmark.java
@@ -53,7 +53,7 @@ public TestBenchmark() {
super(5);
}
- @Test
+ @Test(timeout=60000)
public void testThroughputLatency() throws Exception {
String latencyFile = System.getProperty("test.latency.file", "latencyDump.dat");
BenchThroughputLatency.main(new String[] {
@@ -66,7 +66,7 @@ public void testThroughputLatency() throws Exception {
});
}
- @Test
+ @Test(timeout=60000)
public void testBookie() throws Exception {
InetSocketAddress bookie = getBookie(0);
BenchBookie.main(new String[] {
@@ -76,7 +76,7 @@ public void testBookie() throws Exception {
});
}
- @Test
+ @Test(timeout=60000)
public void testReadThroughputLatency() throws Exception {
final AtomicBoolean threwException = new AtomicBoolean(false);
Thread t = new Thread() {
View
22 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
@@ -200,7 +200,7 @@ private JournalChannel writePostV3Journal(File journalDir, int numEntries, byte[
* word at the start. This is for versions of bookkeeper before
* the magic word was introduced
*/
- @Test
+ @Test(timeout=60000)
public void testPreV2Journal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -239,7 +239,7 @@ public void testPreV2Journal() throws Exception {
* start the bookie. An admin should look to see what has
* happened in this case
*/
- @Test
+ @Test(timeout=60000)
public void testAllJunkJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -277,7 +277,7 @@ public void testAllJunkJournal() throws Exception {
* the magic word existed, if the bookie started but nothing was
* ever written.
*/
- @Test
+ @Test(timeout=60000)
public void testEmptyJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -303,7 +303,7 @@ public void testEmptyJournal() throws Exception {
* Test that a journal can load if only the magic word and
* version are there.
*/
- @Test
+ @Test(timeout=60000)
public void testHeaderOnlyJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -329,7 +329,7 @@ public void testHeaderOnlyJournal() throws Exception {
* Test that if a journal has junk at the end, it does not load.
* If the journal is corrupt like this, admin intervention is needed
*/
- @Test
+ @Test(timeout=60000)
public void testJunkEndedJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -368,7 +368,7 @@ public void testJunkEndedJournal() throws Exception {
* should be fine here. The bookie has crashed while writing
* but so the client has not be notified of success.
*/
- @Test
+ @Test(timeout=60000)
public void testTruncatedInLenJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -416,7 +416,7 @@ public void testTruncatedInLenJournal() throws Exception {
* This is ok, as the client will disregard the entry after looking
* at its checksum.
*/
- @Test
+ @Test(timeout=60000)
public void testTruncatedInEntryJournal() throws Exception {
File journalDir = File.createTempFile("bookie", "journal");
journalDir.delete();
@@ -473,15 +473,15 @@ public void testTruncatedInEntryJournal() throws Exception {
/**
* Test partial index (truncate master key) with pre-v3 journals
*/
- @Test
+ @Test(timeout=60000)
public void testPartialFileInfoPreV3Journal1() throws Exception {
testPartialFileInfoPreV3Journal(true);
}
/**
* Test partial index with pre-v3 journals
*/
- @Test
+ @Test(timeout=60000)
public void testPartialFileInfoPreV3Journal2() throws Exception {
testPartialFileInfoPreV3Journal(false);
}
@@ -533,15 +533,15 @@ private void testPartialFileInfoPreV3Journal(boolean truncateMasterKey)
/**
* Test partial index (truncate master key) with post-v3 journals
*/
- @Test
+ @Test(timeout=60000)
public void testPartialFileInfoPostV3Journal1() throws Exception {
testPartialFileInfoPostV3Journal(true);
}
/**
* Test partial index with post-v3 journals
*/
- @Test
+ @Test(timeout=60000)
public void testPartialFileInfoPostV3Journal2() throws Exception {
testPartialFileInfoPostV3Journal(false);
}
View
10 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CompactionTest.java
@@ -133,7 +133,7 @@ private void verifyLedger(long lid, long startEntryId, long endEntryId) throws E
}
}
- @Test
+ @Test(timeout=60000)
public void testDisableCompaction() throws Exception {
// prepare data
LedgerHandle[] lhs = prepareData(3, false);
@@ -160,7 +160,7 @@ public void testDisableCompaction() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testMinorCompaction() throws Exception {
// prepare data
LedgerHandle[] lhs = prepareData(3, false);
@@ -194,7 +194,7 @@ public void testMinorCompaction() throws Exception {
verifyLedger(lhs[0].getId(), 0, lhs[0].getLastAddConfirmed());
}
- @Test
+ @Test(timeout=60000)
public void testMajorCompaction() throws Exception {
// prepare data
@@ -229,7 +229,7 @@ public void testMajorCompaction() throws Exception {
verifyLedger(lhs[1].getId(), 0, lhs[1].getLastAddConfirmed());
}
- @Test
+ @Test(timeout=60000)
public void testMajorCompactionAboveThreshold() throws Exception {
// prepare data
LedgerHandle[] lhs = prepareData(3, false);
@@ -252,7 +252,7 @@ public void testMajorCompactionAboveThreshold() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testCompactionSmallEntryLogs() throws Exception {
// create a ledger to write a few entries
View
20 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CookieTest.java
@@ -73,7 +73,7 @@ private static String newDirectory(boolean createCurDir) throws IOException {
/**
* Test starting bookie with clean state.
*/
- @Test
+ @Test(timeout=60000)
public void testCleanStart() throws Exception {
ServerConfiguration conf = new ServerConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString())
@@ -92,7 +92,7 @@ public void testCleanStart() throws Exception {
* is different to a local cookie, the bookie
* will fail to start
*/
- @Test
+ @Test(timeout=60000)
public void testBadJournalCookie() throws Exception {
ServerConfiguration conf1 = new ServerConfiguration()
.setJournalDirName(newDirectory())
@@ -125,7 +125,7 @@ public void testBadJournalCookie() throws Exception {
* the configuration, the bookie will fail to
* start
*/
- @Test
+ @Test(timeout=60000)
public void testDirectoryMissing() throws Exception {
String[] ledgerDirs = new String[] {
newDirectory(), newDirectory(), newDirectory() };
@@ -167,7 +167,7 @@ public void testDirectoryMissing() throws Exception {
* preexisting bookie, the bookie will fail
* to start
*/
- @Test
+ @Test(timeout=60000)
public void testDirectoryAdded() throws Exception {
String ledgerDir0 = newDirectory();
String journalDir = newDirectory();
@@ -199,7 +199,7 @@ public void testDirectoryAdded() throws Exception {
* Test that if a directory's contents
* are emptied, the bookie will fail to start
*/
- @Test
+ @Test(timeout=60000)
public void testDirectoryCleared() throws Exception {
String ledgerDir0 = newDirectory();
String journalDir = newDirectory();
@@ -226,7 +226,7 @@ public void testDirectoryCleared() throws Exception {
* Test that if a bookie's port is changed
* the bookie will fail to start
*/
- @Test
+ @Test(timeout=60000)
public void testBookiePortChanged() throws Exception {
ServerConfiguration conf = new ServerConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString())
@@ -252,7 +252,7 @@ public void testBookiePortChanged() throws Exception {
* existed in the system, then the bookie will fail
* to start
*/
- @Test
+ @Test(timeout=60000)
public void testNewBookieStartingWithAnotherBookiesPort() throws Exception {
ServerConfiguration conf = new ServerConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString())
@@ -279,7 +279,7 @@ public void testNewBookieStartingWithAnotherBookiesPort() throws Exception {
/*
* Test Cookie verification with format.
*/
- @Test
+ @Test(timeout=60000)
public void testVerifyCookieWithFormat() throws Exception {
ClientConfiguration adminConf = new ClientConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString());
@@ -317,7 +317,7 @@ public void testVerifyCookieWithFormat() throws Exception {
* Test that if a bookie is started with directories with
* version 2 data, that it will fail to start (it needs upgrade)
*/
- @Test
+ @Test(timeout=60000)
public void testV2data() throws Exception {
ServerConfiguration conf = new ServerConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString())
@@ -337,7 +337,7 @@ public void testV2data() throws Exception {
* Test that if a bookie is started with directories with
* version 1 data, that it will fail to start (it needs upgrade)
*/
- @Test
+ @Test(timeout=60000)
public void testV1data() throws Exception {
ServerConfiguration conf = new ServerConfiguration()
.setZkServers(zkutil.getZooKeeperConnectString())
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CreateNewLogTest.java
@@ -75,7 +75,7 @@ private void deleteRecursive(File f) {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testCreateNewLog() throws Exception {
ServerConfiguration conf = new ServerConfiguration();
View
8 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
@@ -46,7 +46,7 @@
public void setUp() throws Exception {
}
- @Test
+ @Test(timeout=60000)
public void testCorruptEntryLog() throws Exception {
File tmpDir = File.createTempFile("bkTest", ".dir");
tmpDir.delete();
@@ -98,7 +98,7 @@ private ByteBuffer generateEntry(long ledger, long entry) {
return bb;
}
- @Test
+ @Test(timeout=60000)
public void testMissingLogId() throws Exception {
File tmpDir = File.createTempFile("entryLogTest", ".dir");
tmpDir.delete();
@@ -161,7 +161,7 @@ public void testMissingLogId() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
/** Test that EntryLogger Should fail with FNFE, if entry logger directories does not exist*/
public void testEntryLoggerShouldThrowFNFEIfDirectoriesDoesNotExist()
throws Exception {
@@ -186,7 +186,7 @@ public void testEntryLoggerShouldThrowFNFEIfDirectoriesDoesNotExist()
/**
* Test to verify the DiskFull during addEntry
*/
- @Test
+ @Test(timeout=60000)
public void testAddEntryFailureOnDiskFull() throws Exception {
File ledgerDir1 = File.createTempFile("bkTest", ".dir");
ledgerDir1.delete();
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/TestLedgerDirsManager.java
@@ -53,7 +53,7 @@ public void setUp() throws Exception {
dirsManager = new LedgerDirsManager(conf);
}
- @Test
+ @Test(timeout=60000)
public void testPickWritableDirExclusive() throws Exception {
try {
dirsManager.pickRandomWritableDir(curDir);
@@ -64,7 +64,7 @@ public void testPickWritableDirExclusive() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testNoWritableDir() throws Exception {
try {
dirsManager.addToFilledDirs(curDir);
View
8 bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/UpgradeTest.java
@@ -201,21 +201,21 @@ private static void testUpgradeProceedure(String zkServers, String journalDir, S
b = null;
}
- @Test
+ @Test(timeout=60000)
public void testUpgradeV1toCurrent() throws Exception {
String journalDir = newV1JournalDirectory();
String ledgerDir = newV1LedgerDirectory();
testUpgradeProceedure(zkutil.getZooKeeperConnectString(), journalDir, ledgerDir);
}
- @Test
+ @Test(timeout=60000)
public void testUpgradeV2toCurrent() throws Exception {
String journalDir = newV2JournalDirectory();
String ledgerDir = newV2LedgerDirectory();
testUpgradeProceedure(zkutil.getZooKeeperConnectString(), journalDir, ledgerDir);
}
- @Test
+ @Test(timeout=60000)
public void testUpgradeCurrent() throws Exception {
String journalDir = newV2JournalDirectory();
String ledgerDir = newV2LedgerDirectory();
@@ -232,7 +232,7 @@ public void testUpgradeCurrent() throws Exception {
b.shutdown();
}
- @Test
+ @Test(timeout=60000)
public void testCommandLine() throws Exception {
PrintStream origerr = System.err;
PrintStream origout = System.out;
View
8 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java
@@ -52,7 +52,7 @@ public BookKeeperTest(DigestType digestType) {
this.digestType = digestType;
}
- @Test
+ @Test(timeout=60000)
public void testConstructionZkDelay() throws Exception {
ClientConfiguration conf = new ClientConfiguration()
.setZkServers(zkUtil.getZooKeeperConnectString())
@@ -67,7 +67,7 @@ public void testConstructionZkDelay() throws Exception {
bkc.close();
}
- @Test
+ @Test(timeout=60000)
public void testConstructionNotConnectedExplicitZk() throws Exception {
ClientConfiguration conf = new ClientConfiguration()
.setZkServers(zkUtil.getZooKeeperConnectString())
@@ -96,7 +96,7 @@ public void process(WatchedEvent event) {
* Test that bookkeeper is not able to open ledgers if
* it provides the wrong password or wrong digest
*/
- @Test
+ @Test(timeout=60000)
public void testBookkeeperPassword() throws Exception {
ClientConfiguration conf = new ClientConfiguration()
.setZkServers(zkUtil.getZooKeeperConnectString());
@@ -156,7 +156,7 @@ public void testBookkeeperPassword() throws Exception {
* a callback error and not an InterruptedException.
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testAsyncReadWithError() throws Exception {
LedgerHandle lh = bkc.createLedger(3, 3, DigestType.CRC32, "testPasswd".getBytes());
bkc.close();
View
22 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
@@ -236,7 +236,7 @@ private void verifyRecoveredLedgers(List<LedgerHandle> oldLhs, long startEntryId
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testAsyncBookieRecoveryToSpecificBookie() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -290,7 +290,7 @@ public void testAsyncBookieRecoveryToSpecificBookie() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testAsyncBookieRecoveryToRandomBookies() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -345,7 +345,7 @@ public void testAsyncBookieRecoveryToRandomBookies() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testSyncBookieRecoveryToSpecificBookie() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -389,7 +389,7 @@ public void testSyncBookieRecoveryToSpecificBookie() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testSyncBookieRecoveryToRandomBookies() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -558,7 +558,7 @@ private boolean findDupesInEnsembles(List<LedgerHandle> lhs) throws Exception {
/**
* Test recoverying the closed ledgers when the failed bookie server is in the last ensemble
*/
- @Test
+ @Test(timeout=60000)
public void testBookieRecoveryOnClosedLedgers() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -590,7 +590,7 @@ public void testBookieRecoveryOnClosedLedgers() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testBookieRecoveryOnOpenedLedgers() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -627,7 +627,7 @@ public void testBookieRecoveryOnOpenedLedgers() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testBookieRecoveryOnInRecoveryLedger() throws Exception {
int numMsgs = 10;
// Create the ledgers
@@ -689,7 +689,7 @@ public void testBookieRecoveryOnInRecoveryLedger() throws Exception {
}
- @Test
+ @Test(timeout=60000)
public void testAsyncBookieRecoveryToRandomBookiesNotEnoughBookies() throws Exception {
// Create the ledgers
int numLedgers = 3;
@@ -720,7 +720,7 @@ public void testAsyncBookieRecoveryToRandomBookiesNotEnoughBookies() throws Exce
}
}
- @Test
+ @Test(timeout=60000)
public void testSyncBookieRecoveryToRandomBookiesCheckForDupes() throws Exception {
Random r = new Random();
@@ -764,7 +764,7 @@ public void testSyncBookieRecoveryToRandomBookiesCheckForDupes() throws Exceptio
}
}
- @Test
+ @Test(timeout=60000)
public void recoverWithoutPasswordInConf() throws Exception {
byte[] passwdCorrect = "AAAAAA".getBytes();
byte[] passwdBad = "BBBBBB".getBytes();
@@ -833,7 +833,7 @@ public void recoverWithoutPasswordInConf() throws Exception {
* Test that when we try to recover a ledger which doesn't have
* the password stored in the configuration, we don't succeed
*/
- @Test
+ @Test(timeout=60000)
public void ensurePasswordUsedForOldLedgers() throws Exception {
// This test bases on creating old ledgers in version 4.1.0, which only
// supports ZooKeeper based flat and hierarchical LedgerManagerFactory.
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieWriteLedgerTest.java
@@ -87,7 +87,7 @@ public BookieWriteLedgerTest(String ledgerManagerFactory,
* Verify write when few bookie failures in last ensemble and forcing
* ensemble reformation
*/
- @Test
+ @Test(timeout=60000)
public void testWithMultipleBookieFailuresInLastEnsemble() throws Exception {
// Create a ledger
lh = bkc.createLedger(5, 4, digestType, ledgerPassword);
@@ -130,7 +130,7 @@ public void testWithMultipleBookieFailuresInLastEnsemble() throws Exception {
/**
* Verify asynchronous writing when few bookie failures in last ensemble.
*/
- @Test
+ @Test(timeout=60000)
public void testAsyncWritesWithMultipleFailuresInLastEnsemble()
throws Exception {
// Create ledgers
View
12 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerRecoveryTest.java
@@ -82,23 +82,23 @@ private void testInternal(int numEntries) throws Exception {
afterlh.getLength() == length);
}
- @Test
+ @Test(timeout=60000)
public void testLedgerRecovery() throws Exception {
testInternal(100);
}
- @Test
+ @Test(timeout=60000)
public void testEmptyLedgerRecoveryOne() throws Exception {
testInternal(1);
}
- @Test
+ @Test(timeout=60000)
public void testEmptyLedgerRecovery() throws Exception {
testInternal(0);
}
- @Test
+ @Test(timeout=60000)
public void testLedgerRecoveryWithWrongPassword() throws Exception {
// Create a ledger
byte[] ledgerPassword = "aaaa".getBytes();
@@ -122,7 +122,7 @@ public void testLedgerRecoveryWithWrongPassword() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testLedgerRecoveryWithNotEnoughBookies() throws Exception {
int numEntries = 3;
@@ -160,7 +160,7 @@ public void testLedgerRecoveryWithNotEnoughBookies() throws Exception {
assertEquals(numEntries - 1, afterlh.getLastAddConfirmed());
}
- @Test
+ @Test(timeout=60000)
public void testLedgerRecoveryWithSlowBookie() throws Exception {
for (int i = 0; i < 3; i++) {
LOG.info("TestLedgerRecoveryWithAckQuorum @ slow bookie {}", i);
View
2 ...server/src/test/java/org/apache/bookkeeper/client/RoundRobinDistributionScheduleTest.java
@@ -32,7 +32,7 @@
public class RoundRobinDistributionScheduleTest {
static Logger LOG = LoggerFactory.getLogger(RoundRobinDistributionScheduleTest.class);
- @Test
+ @Test(timeout=60000)
public void testDistributionSchedule() throws Exception {
RoundRobinDistributionSchedule schedule = new RoundRobinDistributionSchedule(3, 2, 5);
View
6 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/SlowBookieTest.java
@@ -46,7 +46,7 @@ public SlowBookieTest() {
super(4);
}
- @Test
+ @Test(timeout=60000)
public void testSlowBookie() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
conf.setZkServers(zkUtil.getZooKeeperConnectString()).setReadTimeout(360);
@@ -89,7 +89,7 @@ public void addComplete(int rc, LedgerHandle lh, long entryId, Object ctx) {
}
}
- @Test
+ @Test(timeout=60000)
public void testBookieFailureWithSlowBookie() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
conf.setZkServers(zkUtil.getZooKeeperConnectString()).setReadTimeout(5);
@@ -144,7 +144,7 @@ public void operationComplete(int rc, Set<LedgerFragment> fragments) {
assertEquals("There should be no missing fragments", 0, numFragments.get());
}
- @Test
+ @Test(timeout=60000)
public void testManyBookieFailureWithSlowBookies() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
conf.setZkServers(zkUtil.getZooKeeperConnectString()).setReadTimeout(5);
View
12 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java
@@ -56,7 +56,7 @@ public TestFencing(DigestType digestType) {
* Basic fencing test. Create ledger, write to it,
* open ledger, write again (should fail).
*/
- @Test
+ @Test(timeout=60000)
public void testBasicFencing() throws Exception {
/*
* Create ledger.
@@ -155,7 +155,7 @@ long getLastConfirmedEntry() {
* All opens should result in a ledger with an equals number of
* entries.
*/
- @Test
+ @Test(timeout=60000)
public void testManyOpenParallel() throws Exception {
/*
* Create ledger.
@@ -204,7 +204,7 @@ public void run() {
* Test that opening a ledger in norecovery mode
* doesn't fence off a ledger
*/
- @Test
+ @Test(timeout=60000)
public void testNoRecoveryOpen() throws Exception {
/*
* Create ledger.
@@ -250,7 +250,7 @@ public void testNoRecoveryOpen() throws Exception {
* kill a bookie in the ensemble. Recover.
* Fence the ledger. Kill another bookie. Recover.
*/
- @Test
+ @Test(timeout=60000)
public void testFencingInteractionWithBookieRecovery() throws Exception {
System.setProperty("digestType", digestType.toString());
System.setProperty("passwd", "testPasswd");
@@ -305,7 +305,7 @@ public void testFencingInteractionWithBookieRecovery() throws Exception {
* Fence the ledger. Kill a bookie. Recover.
* Ensure that recover doesn't reallow adding
*/
- @Test
+ @Test(timeout=60000)
public void testFencingInteractionWithBookieRecovery2() throws Exception {
System.setProperty("digestType", digestType.toString());
System.setProperty("passwd", "testPasswd");
@@ -350,7 +350,7 @@ public void testFencingInteractionWithBookieRecovery2() throws Exception {
/**
* Test that fencing doesn't work with a bad password
*/
- @Test
+ @Test(timeout=60000)
public void testFencingBadPassword() throws Exception {
/*
* Create ledger.
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerChecker.java
@@ -64,7 +64,7 @@ public void operationComplete(int rc, Set<LedgerFragment> result) {
* Tests that the LedgerChecker should detect the underReplicated fragments
* on multiple Bookie crashes
*/
- @Test
+ @Test(timeout=60000)
public void testChecker() throws Exception {
LedgerHandle lh = bkc.createLedger(BookKeeper.DigestType.CRC32,
View
6 ...eper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerFragmentReplication.java
@@ -71,7 +71,7 @@ public void operationComplete(int rc, Set<LedgerFragment> result) {
* Tests that replicate method should replicate the failed bookie fragments
* to target bookie passed.
*/
- @Test
+ @Test(timeout=60000)
public void testReplicateLFShouldCopyFailedBookieFragmentsToTargetBookie()
throws Exception {
byte[] data = "TestLedgerFragmentReplication".getBytes();
@@ -128,7 +128,7 @@ public void testReplicateLFShouldCopyFailedBookieFragmentsToTargetBookie()
* Tests that fragment re-replication fails on last unclosed ledger
* fragments.
*/
- @Test
+ @Test(timeout=60000)
public void testReplicateLFFailsOnlyOnLastUnClosedFragments()
throws Exception {
byte[] data = "TestLedgerFragmentReplication".getBytes();
@@ -186,7 +186,7 @@ public void testReplicateLFFailsOnlyOnLastUnClosedFragments()
* Tests that ReplicateLedgerFragment should return false if replication
* fails
*/
- @Test
+ @Test(timeout=60000)
public void testReplicateLFShouldReturnFalseIfTheReplicationFails()
throws Exception {
byte[] data = "TestLedgerFragmentReplication".getBytes();
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestReadTimeout.java
@@ -57,7 +57,7 @@ public TestReadTimeout() {
this.digestType = DigestType.CRC32;
}
- @Test
+ @Test(timeout=60000)
public void testReadTimeout() throws Exception {
final AtomicBoolean completed = new AtomicBoolean(false);
View
8 bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestSpeculativeRead.java
@@ -120,7 +120,7 @@ void expectTimeout(int milliseconds) throws Exception {
* - read second bookie, spec client should find on bookie three,
* non spec client should hang.
*/
- @Test
+ @Test(timeout=60000)
public void testSpeculativeRead() throws Exception {
long id = getLedgerToRead(3,2);
BookKeeper bknospec = createClient(0); // disabled
@@ -164,7 +164,7 @@ public void testSpeculativeRead() throws Exception {
* Test that if more than one replica is down, we can still read, as long as the quorum
* size is larger than the number of down replicas.
*/
- @Test
+ @Test(timeout=60000)
public void testSpeculativeReadMultipleReplicasDown() throws Exception {
long id = getLedgerToRead(5,5);
int timeout = 5000;
@@ -235,7 +235,7 @@ public void testSpeculativeReadMultipleReplicasDown() throws Exception {
* Test that if after a speculative read is kicked off, the original read completes
* nothing bad happens.
*/
- @Test
+ @Test(timeout=60000)
public void testSpeculativeReadFirstReadCompleteIsOk() throws Exception {
long id = getLedgerToRead(2,2);
int timeout = 1000;
@@ -278,7 +278,7 @@ public void testSpeculativeReadFirstReadCompleteIsOk() throws Exception {
/**
* Unit test for the speculative read scheduling method
*/
- @Test
+ @Test(timeout=60000)
public void testSpeculativeReadScheduling() throws Exception {
long id = getLedgerToRead(3,2);
int timeout = 1000;
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/GcLedgersTest.java
@@ -85,7 +85,7 @@ public void operationComplete(int rc, Long ledgerId) {
}
}
- @Test
+ @Test(timeout=60000)
public void testGarbageCollectLedgers() throws Exception {
int numLedgers = 100;
int numRemovedLedgers = 10;
View
10 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/LedgerLayoutTest.java
@@ -37,7 +37,7 @@ public LedgerLayoutTest() {
super(0);
}
- @Test
+ @Test(timeout=60000)
public void testLedgerLayout() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
conf.setLedgerManagerFactoryClass(HierarchicalLedgerManagerFactory.class);
@@ -74,7 +74,7 @@ private void writeLedgerLayout(
layout.store(zkc, ledgersRootPath);
}
- @Test
+ @Test(timeout=60000)
public void testBadVersionLedgerLayout() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
// write bad version ledger layout
@@ -91,7 +91,7 @@ public void testBadVersionLedgerLayout() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testAbsentLedgerManagerLayout() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
String ledgersLayout = conf.getZkLedgersRootPath() + "/"
@@ -110,7 +110,7 @@ public void testAbsentLedgerManagerLayout() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testBaseLedgerManagerLayout() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
String rootPath = conf.getZkLedgersRootPath();
@@ -131,7 +131,7 @@ public void testBaseLedgerManagerLayout() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadV1LedgerManagerLayout() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
// write v1 ledger layout
View
10 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/TestLedgerManager.java
@@ -65,7 +65,7 @@ private void writeLedgerLayout(String ledgersRootPath,
/**
* Test bad client configuration
*/
- @Test
+ @Test(timeout=60000)
public void testBadConf() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
@@ -111,7 +111,7 @@ public void testBadConf() throws Exception {
/**
* Test bad client configuration
*/
- @Test
+ @Test(timeout=60000)
public void testBadConfV1() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
@@ -152,7 +152,7 @@ public void testBadConfV1() throws Exception {
/**
* Test bad zk configuration
*/
- @Test
+ @Test(timeout=60000)
public void testBadZkContents() throws Exception {
ClientConfiguration conf = new ClientConfiguration();
@@ -240,7 +240,7 @@ public void close() throws Exception {
}
// test concurrent
- @Test
+ @Test(timeout=60000)
public void testConcurrent1() throws Exception {
/// everyone creates the same
int numThreads = 50;
@@ -270,7 +270,7 @@ public void testConcurrent1() throws Exception {
assertTrue("Not all ledger managers created", success);
}
- @Test
+ @Test(timeout=60000)
public void testConcurrent2() throws Exception {
/// odd create different
int numThreadsEach = 25;
View
6 bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/TestZkVersion.java
@@ -28,7 +28,7 @@
public class TestZkVersion {
- @Test
+ @Test(timeout=60000)
public void testNullZkVersion() {
ZkVersion zkVersion = new ZkVersion(99);
try {
@@ -38,7 +38,7 @@ public void testNullZkVersion() {
}
}
- @Test
+ @Test(timeout=60000)
public void testInvalidVersion() {
ZkVersion zkVersion = new ZkVersion(99);
try {
@@ -53,7 +53,7 @@ public Occurred compare(Version v) {
}
}
- @Test
+ @Test(timeout=60000)
public void testCompare() {
ZkVersion zv = new ZkVersion(99);
Assert.assertEquals(Occurred.AFTER, zv.compare(new ZkVersion(98)));
View
10 bookkeeper-server/src/test/java/org/apache/bookkeeper/metastore/TestMetaStore.java
@@ -295,7 +295,7 @@ protected void clearTable() throws Exception {
/**
* Test (get, get partial field, remove) on non-existent element.
*/
- @Test
+ @Test(timeout=60000)
public void testNonExistent() throws Exception {
// get
try {
@@ -324,7 +324,7 @@ public void testNonExistent() throws Exception {
/**
* Test usage of get operation on (full and partial) fields.
*/
- @Test
+ @Test(timeout=60000)
public void testGet() throws Exception {
Versioned<Value> vv;
@@ -371,7 +371,7 @@ public void testGet() throws Exception {
/**
* Test usage of put operation with (full and partial) fields.
*/
- @Test
+ @Test(timeout=60000)
public void testPut() throws Exception {
final Integer counter = getRandom();
final String name = "put";
@@ -462,7 +462,7 @@ protected void illegalPut(Value value, Version version) throws MSException {
* Test usage of (unconditional remove, BadVersion remove, CorrectVersion
* remove) operation.
*/
- @Test
+ @Test(timeout=60000)
public void testRemove() throws Exception {
final Integer counter = getRandom();
final String name = "remove";
@@ -541,7 +541,7 @@ void openRangeCursorTest(String firstKey, boolean firstInclusive,
/**
* Test usage of (scan) operation on (full and partial) fields.
*/
- @Test
+ @Test(timeout=60000)
public void testOpenCursor() throws Exception {
TreeMap<String, Value> allValues = Maps.newTreeMap();
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
@@ -32,7 +32,7 @@
* Tests that updatLatency should not fail with
* ArrayIndexOutOfBoundException when latency time coming as negative.
*/
- @Test
+ @Test(timeout=60000)
public void testUpdateLatencyShouldNotFailWithAIOBEWithNegativeLatency()
throws Exception {
OpStats opStat = new OpStats();
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
@@ -103,7 +103,7 @@ public void readEntryComplete(int rc, long ledgerId, long entryId, ChannelBuffer
bc.close();
}
- @Test
+ @Test(timeout=60000)
public void testVersions() throws Exception {
testVersion(BookieProtocol.LOWEST_COMPAT_PROTOCOL_VERSION-1, BKException.Code.ProtocolVersionException);
testVersion(BookieProtocol.LOWEST_COMPAT_PROTOCOL_VERSION, BKException.Code.NoSuchEntryException);
View
12 bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
@@ -80,7 +80,7 @@ public void tearDown() throws Exception {
* other than auditor bookie shouldn't initiate re-election and multiple
* auditors.
*/
- @Test
+ @Test(timeout=60000)
public void testEnsureOnlySingleAuditor() throws Exception {
BookieServer auditor = verifyAuditor();
@@ -107,7 +107,7 @@ public void testEnsureOnlySingleAuditor() throws Exception {
* Test Auditor crashes should trigger re-election and another bookie should
* take over the auditor ship
*/
- @Test
+ @Test(timeout=60000)
public void testSuccessiveAuditorCrashes() throws Exception {
BookieServer auditor = verifyAuditor();
shutdownBookie(auditor);
@@ -127,7 +127,7 @@ public void testSuccessiveAuditorCrashes() throws Exception {
* Test restarting the entire bookie cluster. It shouldn't create multiple
* bookie auditors
*/
- @Test
+ @Test(timeout=60000)
public void testBookieClusterRestart() throws Exception {
BookieServer auditor = verifyAuditor();
for (AuditorElector auditorElector : auditorElectors.values()) {
@@ -148,7 +148,7 @@ public void testBookieClusterRestart() throws Exception {
/**
* Test the vote is deleting from the ZooKeeper during shutdown.
*/
- @Test
+ @Test(timeout=60000)
public void testShutdown() throws Exception {
BookieServer auditor = verifyAuditor();
shutdownBookie(auditor);
@@ -176,7 +176,7 @@ public void testShutdown() throws Exception {
* Test restart of the previous Auditor bookie shouldn't initiate
* re-election and should create new vote after restarting.
*/
- @Test
+ @Test(timeout=60000)
public void testRestartAuditorBookieAfterCrashing() throws Exception {
BookieServer auditor = verifyAuditor();
@@ -211,7 +211,7 @@ public void testRestartAuditorBookieAfterCrashing() throws Exception {
* Test that, if an auditor looses its ZK connection/session
* it will shutdown.
*/
- @Test
+ @Test(timeout=60000)
public void testAuditorZKSessionLoss() throws Exception {
stopZKCluster();
for (AuditorElector e : auditorElectors.values()) {
View
6 ...eper-server/src/test/java/org/apache/bookkeeper/replication/AuditorLedgerCheckerTest.java
@@ -128,7 +128,7 @@ private void stopAuditorElectors() throws Exception {
/**
* Test publishing of under replicated ledgers by the auditor bookie
*/
- @Test
+ @Test(timeout=60000)
public void testSimpleLedger() throws Exception {
LedgerHandle lh1 = createAndAddEntriesToLedger();
Long ledgerId = lh1.getId();
@@ -166,7 +166,7 @@ public void testSimpleLedger() throws Exception {
* Test once published under replicated ledger should exists even after
* restarting respective bookie
*/
- @Test
+ @Test(timeout=60000)
public void testRestartBookie() throws Exception {
LedgerHandle lh1 = createAndAddEntriesToLedger();
ledgerList.add(lh1.getId());
@@ -215,7 +215,7 @@ public void testRestartBookie() throws Exception {
* Test publishing of under replicated ledgers when multiple bookie failures
* one after another.
*/
- @Test
+ @Test(timeout=60000)
public void testMultipleBookieFailures() throws Exception {
LedgerHandle lh1 = createAndAddEntriesToLedger();
ledgerList.add(lh1.getId());
View
6 bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/BookieLedgerIndexTest.java
@@ -102,7 +102,7 @@ public void tearDown() throws Exception {
* Verify the bookie-ledger mapping with minimum number of bookies and few
* ledgers
*/
- @Test
+ @Test(timeout=60000)
public void testSimpleBookieLedgerMapping() throws Exception {
for (int i = 0; i < numberOfLedgers; i++) {
@@ -131,7 +131,7 @@ public void testSimpleBookieLedgerMapping() throws Exception {
/**
* Verify ledger index with failed bookies and throws exception
*/
- @Test
+ @Test(timeout=60000)
public void testWithoutZookeeper() throws Exception {
// This test case is for ledger metadata that stored in ZooKeeper. As
// far as MSLedgerManagerFactory, ledger metadata are stored in other
@@ -158,7 +158,7 @@ public void testWithoutZookeeper() throws Exception {
/**
* Verify indexing with multiple ensemble reformation
*/
- @Test
+ @Test(timeout=60000)
public void testEnsembleReformation() throws Exception {
try {
LedgerHandle lh1 = createAndAddEntriesToLedger();
View
18 ...er/src/test/java/org/apache/bookkeeper/replication/TestLedgerUnderreplicationManager.java
@@ -157,7 +157,7 @@ public Long call() {
* Ensure that getLedgerToReplicate will block until it a ledger
* becomes available.
*/
- @Test
+ @Test(timeout=60000)
public void testBasicInteraction() throws Exception {
Set<Long> ledgers = new HashSet<Long>();
ledgers.add(0xdeadbeefL);
@@ -203,7 +203,7 @@ public void testBasicInteraction() throws Exception {
* client shouldn't be able to get it. If the first client dies
* however, the second client should be able to get it.
*/
- @Test
+ @Test(timeout=60000)
public void testLocking() throws Exception {
String missingReplica = "localhost:3181";
@@ -240,7 +240,7 @@ public void testLocking() throws Exception {
* acquire a ledger, and that it's not the one that was previously
* marked as replicated.
*/
- @Test
+ @Test(timeout=60000)
public void testMarkingAsReplicated() throws Exception {
String missingReplica = "localhost:3181";
@@ -284,7 +284,7 @@ public void testMarkingAsReplicated() throws Exception {
* When a client releases a previously acquired ledger, another
* client should then be able to acquire it.
*/
- @Test
+ @Test(timeout=60000)
public void testRelease() throws Exception {
String missingReplica = "localhost:3181";
@@ -326,7 +326,7 @@ public void testRelease() throws Exception {
* under replicated ledger list when first rereplicating client marks
* it as replicated.
*/
- @Test
+ @Test(timeout=60000)
public void testManyFailures() throws Exception {
String missingReplica1 = "localhost:3181";
String missingReplica2 = "localhost:3182";
@@ -356,7 +356,7 @@ public void testManyFailures() throws Exception {
* the same missing replica twice, only marking as replicated
* will be enough to remove it from the list.
*/
- @Test
+ @Test(timeout=60000)
public void test2reportSame() throws Exception {
String missingReplica1 = "localhost:3181";
@@ -454,7 +454,7 @@ public void run() {
* localhost:3181, localhost:318, localhost:31812
* *******************************************************************
*/
- @Test
+ @Test(timeout=60000)
public void testMarkSimilarMissingReplica() throws Exception {
List<String> missingReplica = new ArrayList<String>();
missingReplica.add("localhost:3181");
@@ -471,7 +471,7 @@ public void testMarkSimilarMissingReplica() throws Exception {
* Test multiple bookie failures for a ledger and marked as underreplicated
* one after another.
*/
- @Test
+ @Test(timeout=60000)
public void testManyFailuresInAnEnsemble() throws Exception {
List<String> missingReplica = new ArrayList<String>();
missingReplica.add("localhost:3181");
@@ -596,7 +596,7 @@ public void run() {
* Test that the hierarchy gets cleaned up as ledgers
* are marked as fully replicated
*/
- @Test
+ @Test(timeout=60000)
public void testHierarchyCleanup() throws Exception {
final LedgerUnderreplicationManager replicaMgr = lmf1
.newLedgerUnderreplicationManager();
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/AsyncLedgerOpsTest.java
@@ -101,7 +101,7 @@ LedgerHandle getLh() {
}
}
- @Test
+ @Test(timeout=60000)
public void testAsyncCreateClose() throws IOException, BKException {
try {
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
@@ -124,7 +124,7 @@ public void writeComplete(int rc, long ledgerId, long entryId, InetSocketAddress
}
};
- @Test
+ @Test(timeout=60000)
public void testWriteGaps() throws Exception {
final Object notifyObject = new Object();
byte[] passwd = new byte[20];
@@ -229,7 +229,7 @@ private ChannelBuffer createByteBuffer(int i, long lid, long eid) {
return ChannelBuffers.wrappedBuffer(bb);
}
- @Test
+ @Test(timeout=60000)
public void testNoLedger() throws Exception {
ResultStruct arc = new ResultStruct();
InetSocketAddress addr = new InetSocketAddress("127.0.0.1", port);
View
16 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
@@ -96,31 +96,31 @@ public BookieFailureTest(String ledgerManagerFactory, DigestType digestType) {
*
* @throws {@link IOException}
*/
- @Test
+ @Test(timeout=60000)
public void testAsyncBK1() throws IOException {
LOG.info("#### BK1 ####");
auxTestReadWriteAsyncSingleClient(bs.get(0));
}
- @Test
+ @Test(timeout=60000)
public void testAsyncBK2() throws IOException {
LOG.info("#### BK2 ####");
auxTestReadWriteAsyncSingleClient(bs.get(1));
}
- @Test
+ @Test(timeout=60000)
public void testAsyncBK3() throws IOException {
LOG.info("#### BK3 ####");
auxTestReadWriteAsyncSingleClient(bs.get(2));
}
- @Test
+ @Test(timeout=60000)
public void testAsyncBK4() throws IOException {
LOG.info("#### BK4 ####");
auxTestReadWriteAsyncSingleClient(bs.get(3));
}
- @Test
+ @Test(timeout=60000)
public void testBookieRecovery() throws Exception {
//Shutdown all but 1 bookie
bs.get(0).shutdown();
@@ -284,7 +284,7 @@ public void setUp() throws Exception {
zkc.close();
}
- @Test
+ @Test(timeout=60000)
public void testLedgerNoRecoveryOpenAfterBKCrashed() throws Exception {
// Create a ledger
LedgerHandle beforelh = bkc.createLedger(numBookies, numBookies, digestType, "".getBytes());
@@ -322,7 +322,7 @@ public void testLedgerNoRecoveryOpenAfterBKCrashed() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testLedgerOpenAfterBKCrashed() throws Exception {
// Create a ledger
LedgerHandle beforelh = bkc.createLedger(numBookies, numBookies, digestType, "".getBytes());
@@ -370,7 +370,7 @@ public void testLedgerOpenAfterBKCrashed() throws Exception {
*
* BOOKKEEPER-326
*/
- @Test
+ @Test(timeout=60000)
public void testReadLastConfirmedOp() throws Exception {
startNewBookie();
startNewBookie();
View
6 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
@@ -153,7 +153,7 @@ private void validLedgerEntries(long[] ledgerIds, int msgSize, int numMsgs) thro
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testJournalRolling() throws Exception {
if (LOG.isDebugEnabled()) {
LOG.debug("Testing Journal Rolling");
@@ -193,7 +193,7 @@ public void testJournalRolling() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testJournalRollingWithoutSyncup() throws Exception {
if (LOG.isDebugEnabled()) {
LOG.debug("Testing Journal Rolling without sync up");
@@ -225,7 +225,7 @@ public void testJournalRollingWithoutSyncup() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testReplayDeletedLedgerJournalEntries() throws Exception {
if (LOG.isDebugEnabled()) {
LOG.debug("Testing replaying journal entries whose ledger has been removed.");
View
26 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
@@ -120,7 +120,7 @@ void setLedgerEntries(Enumeration<LedgerEntry> ls) {
}
}
- @Test
+ @Test(timeout=60000)
public void testOpenException() throws IOException, InterruptedException {
try {
lh = bkc.openLedger(0, digestType, ledgerPassword);
@@ -135,7 +135,7 @@ public void testOpenException() throws IOException, InterruptedException {
*
* @throws {@link IOException}
*/
- @Test
+ @Test(timeout=60000)
public void testStreamingClients() throws IOException, BKException, InterruptedException {
lh = bkc.createLedger(digestType, ledgerPassword);
// write a string so that we cna
@@ -183,7 +183,7 @@ public void testStreamingClients() throws IOException, BKException, InterruptedE
lh.close();
}
- @Test
+ @Test(timeout=60000)
public void testReadWriteAsyncSingleClient() throws IOException {
SyncObj sync = new SyncObj();
try {
@@ -269,7 +269,7 @@ public void testReadWriteAsyncSingleClient() throws IOException {
* First try varying the offset. Then the length with a fixed non-zero
* offset.
*/
- @Test
+ @Test(timeout=60000)
public void testReadWriteRangeAsyncSingleClient() throws IOException {
SyncObj sync = new SyncObj();
try {
@@ -415,7 +415,7 @@ public void readComplete(int rc, LedgerHandle lh, Enumeration<LedgerEntry> seq,
}
}
- @Test
+ @Test(timeout=60000)
public void testSyncReadAsyncWriteStringsSingleClient() throws IOException {
SyncObj sync = new SyncObj();
LOG.info("TEST READ WRITE STRINGS MIXED SINGLE CLIENT");
@@ -490,7 +490,7 @@ public void testSyncReadAsyncWriteStringsSingleClient() throws IOException {
}
- @Test
+ @Test(timeout=60000)
public void testReadWriteSyncSingleClient() throws IOException {
try {
// Create a ledger
@@ -533,7 +533,7 @@ public void testReadWriteSyncSingleClient() throws IOException {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadWriteZero() throws IOException {
try {
// Create a ledger
@@ -577,7 +577,7 @@ public void testReadWriteZero() throws IOException {
}
}
- @Test
+ @Test(timeout=60000)
public void testMultiLedger() throws IOException {
try {
// Create a ledger
@@ -633,7 +633,7 @@ public void testMultiLedger() throws IOException {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadWriteAsyncLength() throws IOException {
SyncObj sync = new SyncObj();
try {
@@ -684,7 +684,7 @@ public void testReadWriteAsyncLength() throws IOException {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadFromOpenLedger() throws IOException {
try {
// Create a ledger
@@ -775,7 +775,7 @@ public void testReadFromOpenLedger() throws IOException {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadFromOpenLedgerOpenOnce() throws Exception {
try {
// Create a ledger
@@ -835,7 +835,7 @@ public void testReadFromOpenLedgerOpenOnce() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testReadFromOpenLedgerZeroAndOne() throws Exception {
try {
// Create a ledger
@@ -903,7 +903,7 @@ public void testReadFromOpenLedgerZeroAndOne() throws Exception {
}
- @Test
+ @Test(timeout=60000)
public void testLastConfirmedAdd() throws IOException {
try {
// Create a ledger
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java
@@ -42,7 +42,7 @@ public BookieZKExpireTest() {
baseClientConf.setZkTimeout(6000);
}
- @Test
+ @Test(timeout=60000)
public void testBookieServerZKExpireBehaviour() throws Exception {
BookieServer server = null;
try {
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/CloseTest.java
@@ -42,7 +42,7 @@ public CloseTest(DigestType digestType) {
this.digestType = digestType;
}
- @Test
+ @Test(timeout=60000)
public void testClose() throws Exception {
/*
@@ -73,7 +73,7 @@ public void testClose() throws Exception {
}
}
- @Test
+ @Test(timeout=60000)
public void testCloseByOthers() throws Exception {
int numLedgers = 1;
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
@@ -114,7 +114,7 @@ public void tearDown() {
iterationStep = Integer.parseInt(iterationsString);
}
}
- @Test
+ @Test(timeout=60000)
public void testConcurrentWrite() throws IOException, InterruptedException, BookieException {
int size = 1024;
int totalwrites = 128;
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConditionalSetTest.java
@@ -82,7 +82,7 @@ public void setUp() throws IOException, Exception {
* @throws KeeperException
*/
- @Test
+ @Test(timeout=60000)
public void testConditionalSet() throws IOException, InterruptedException,
BKException, KeeperException {
LedgerHandle lhWrite = bkc.createLedger(digestType, new byte[] { 'a',
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConfigurationTest.java
@@ -28,7 +28,7 @@
import org.junit.Test;
public class ConfigurationTest extends TestCase {
- @Test
+ @Test(timeout=60000)
public void testConfigurationOverwrite() {
System.clearProperty("zkServers");
@@ -54,7 +54,7 @@ public void testConfigurationOverwrite() {
assertEquals("newserver", conf2.getZkServers());
}
- @Test
+ @Test(timeout=60000)
public void testGetZkServers() {
System.setProperty("zkServers", "server1:port1,server2:port2");
ServerConfiguration conf = new ServerConfiguration();
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/IndexCorruptionTest.java
@@ -63,7 +63,7 @@ private Thread findSyncThread() {
return null;
}
- @Test
+ @Test(timeout=60000)
public void testNoSuchLedger() throws Exception {
LOG.debug("Testing NoSuchLedger");
@@ -106,7 +106,7 @@ public void testNoSuchLedger() throws Exception {
assertEquals(entryId, numMsgs);
}
- @Test
+ @Test(timeout=60000)
public void testEmptyIndexPage() throws Exception {
LOG.debug("Testing EmptyIndexPage");
View
2 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerCreateDeleteTest.java
@@ -45,7 +45,7 @@ public void setUp() throws Exception {
super.setUp();
}
- @Test
+ @Test(timeout=60000)
public void testCreateDeleteLedgers() throws Exception {
int numLedgers = 3;
ArrayList<Long> ledgers = new ArrayList<Long>();
View
4 bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerDeleteTest.java
@@ -92,7 +92,7 @@ public void setUp() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testLedgerDelete() throws Exception {
// Write enough ledger entries so that we roll over the initial entryLog (0.log)
LedgerHandle[] lhs = writeLedgerEntries(3, 1024, 1024);
@@ -119,7 +119,7 @@ public void testLedgerDelete() throws Exception {
*
* @throws Exception
*/
- @Test
+ @Test(timeout=60000)
public void testLedgerDeleteWithExistingEntryLogs() throws Exception {
// Write enough ledger entries so that we roll over the initial entryLog (0.log)
LedgerHandle[] lhs = writeLedgerEntries(3, 1024, 1024);