Skip to content

Commit

Permalink
Enforce timeout on all integration tests (apache#3011)
Browse files Browse the repository at this point in the history
### Motivation

There are integration tests that are in occasions never finishing. Eg.: https://builds.apache.org/job/pulsar_precommit_integrationtests/4929/

We need to enforce a timeout on all the tests so we know which one is failing (and get a stack trace for where it was stuck at).
  • Loading branch information
merlimat authored and sijie committed Nov 19, 2018
1 parent d487371 commit ab8e268
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<properties>
<property>
<name>listener</name>
<value>org.apache.pulsar.tests.PulsarTestListener</value>
<value>org.apache.pulsar.tests.PulsarTestListener,org.apache.pulsar.tests.AnnotationListener</value>
</property>
</properties>
<argLine>-Xmx2G -XX:MaxDirectMemorySize=8G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@Slf4j
public class TestCompaction extends PulsarTestSuite {

@Test(dataProvider = "ServiceUrls")
@Test(dataProvider = "ServiceUrls", timeOut=300_000)
public void testPublishCompactAndConsumeCLI(String serviceUrl) throws Exception {

final String tenant = "compaction-test-cli-" + randomName(4);
Expand Down Expand Up @@ -99,7 +99,7 @@ public void testPublishCompactAndConsumeCLI(String serviceUrl) throws Exception
}
}

@Test(dataProvider = "ServiceUrls")
@Test(dataProvider = "ServiceUrls", timeOut=300_000)
public void testPublishCompactAndConsumeRest(String serviceUrl) throws Exception {

final String tenant = "compaction-test-rest-" + randomName(4);
Expand Down Expand Up @@ -152,7 +152,7 @@ public void testPublishCompactAndConsumeRest(String serviceUrl) throws Exception
}
}

@Test(dataProvider = "ServiceUrls")
@Test(dataProvider = "ServiceUrls", timeOut=300_000)
public void testPublishCompactAndConsumePartitionedTopics(String serviceUrl) throws Exception {

final String tenant = "compaction-test-partitioned-topic-" + randomName(4);
Expand Down Expand Up @@ -301,7 +301,7 @@ private static void waitAndVerifyCompacted(PulsarClient client, String topic,
}
}

@Test(dataProvider = "ServiceUrls")
@Test(dataProvider = "ServiceUrls", timeOut=300_000)
public void testPublishWithAutoCompaction(String serviceUrl) throws Exception {

final String tenant = "compaction-test-auto-" + randomName(4);
Expand Down

0 comments on commit ab8e268

Please sign in to comment.