Skip to content

Commit

Permalink
Run all tests in parallel by default
Browse files Browse the repository at this point in the history
Annotate all tests that use @BeforeMethod with singleThreaded=true
  • Loading branch information
cberner committed Mar 6, 2014
1 parent eb78261 commit f32339d
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.children="append">
<argLine>-Xmx2g -Xms2g -XX:MaxPermSize=512m</argLine>
<parallel>methods</parallel>
<threadCount>2</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;

@Test(singleThreaded = true)
public class TestCachingCassandraSchemaProvider
{
private static final String CONNECTOR_ID = "test-cassandra";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

@Test(singleThreaded = true)
public class TestExampleMetadata
{
private static final JsonCodec<Map<String, List<ExampleTable>>> CATALOG_CODEC = mapJsonCodec(String.class, listJsonCodec(ExampleTable.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClient
extends AbstractTestHiveClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClientS3
extends AbstractTestHiveClientS3
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestSplitIteratorBackpressure
extends AbstractTestSplitIteratorBackpressure
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClient
extends AbstractTestHiveClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClientS3
extends AbstractTestHiveClientS3
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestSplitIteratorBackpressure
extends AbstractTestSplitIteratorBackpressure
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClient
extends AbstractTestHiveClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestHiveClientS3
extends AbstractTestHiveClientS3
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

@Test(singleThreaded = true)
public class TestSplitIteratorBackpressure
extends AbstractTestSplitIteratorBackpressure
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;

@Test(singleThreaded = true)
public class TestCachingHiveMetastore
{
private MockHiveMetastoreClient mockClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

@Test(singleThreaded = true)
public class TestJdbcResultSet
{
private TestingPrestoServer server;
Expand Down
3 changes: 0 additions & 3 deletions presto-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>hive</excludedGroups>
<parallel>methods</parallel>
<threadCount>2</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static io.airlift.http.client.StringResponseHandler.createStringResponseHandler;
import static org.testng.Assert.assertEquals;

@Test(singleThreaded = true)
public class TestExecuteResource
{
private TestingPrestoServer server;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import static io.airlift.testing.Closeables.closeQuietly;
import static org.testng.Assert.assertTrue;

@Test(singleThreaded = true)
public class TestNodeResource
{
private TestingPrestoServer server;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import static io.airlift.json.JsonCodec.jsonCodec;
import static org.testng.Assert.assertEquals;

@Test(singleThreaded = true)
public class TestQueryResourceServer
{
private HttpClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import static javax.ws.rs.core.Response.Status.OK;
import static org.testng.Assert.assertEquals;

@Test(singleThreaded = true)
public class TestServer
{
private TestingPrestoServer server;
Expand Down

0 comments on commit f32339d

Please sign in to comment.