Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Jun 26, 2023
1 parent 61bda9c commit f7d7b96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public void testUpdateGroupId() {
});
}

@Test(timeOut = 20000, expectedExceptions = KeeperException.NoNodeException.class)
@Test(timeOut = 60000, expectedExceptions = KeeperException.NoNodeException.class)
public void testFindTransactionCoordinatorShouldNotStoreGroupId() throws Exception {
String kafkaServer = "localhost:" + getKafkaBrokerPort();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,25 @@ protected static Object[][] produceConfigProvider() {
};
}

@Test(timeOut = 1000 * 10, dataProvider = "produceConfigProvider")
@Test(timeOut = 1000 * 30, dataProvider = "produceConfigProvider")
public void readCommittedTest(boolean isBatch) throws Exception {
basicProduceAndConsumeTest("read-committed-test", "txn-11", "read_committed", isBatch);
}

@Test(timeOut = 1000 * 10, dataProvider = "produceConfigProvider")
@Test(timeOut = 1000 * 30, dataProvider = "produceConfigProvider")
public void readUncommittedTest(boolean isBatch) throws Exception {
basicProduceAndConsumeTest("read-uncommitted-test", "txn-12", "read_uncommitted", isBatch);
}

@Test(timeOut = 1000 * 10)
@Test(timeOut = 1000 * 30)
public void testInitTransaction() {
final KafkaProducer<Integer, String> producer = buildTransactionProducer("prod-1");

producer.initTransactions();
producer.close();
}

@Test(timeOut = 1000 * 10)
@Test(timeOut = 1000 * 30)
public void testMultiCommits() throws Exception {
final String topic = "test-multi-commits";
final KafkaProducer<Integer, String> producer1 = buildTransactionProducer("X1");
Expand Down Expand Up @@ -234,7 +234,7 @@ public void offsetCommitTest() throws Exception {
txnOffsetTest("txn-offset-commit-test", 10, true);
}

@Test(timeOut = 1000 * 10)
@Test(timeOut = 3000 * 10)
public void offsetAbortTest() throws Exception {
txnOffsetTest("txn-offset-abort-test", 10, false);
}
Expand Down

0 comments on commit f7d7b96

Please sign in to comment.