killbill-memoizeit
Changes
.travis.yml 1(+1 -0)
account/pom.xml 7(+0 -7)
api/pom.xml 1(+0 -1)
beatrix/pom.xml 7(+0 -7)
entitlement/pom.xml 22(+0 -22)
entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationMemory.java 1(+1 -0)
pom.xml 34(+34 -0)
Details
.travis.yml 1(+1 -0)
diff --git a/.travis.yml b/.travis.yml
index bc5123a..93b1a6e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
language: java
+script: mvn clean install -Ptravis
notifications:
email:
account/pom.xml 7(+0 -7)
diff --git a/account/pom.xml b/account/pom.xml
index 389bfb4..0bf9fa3 100644
--- a/account/pom.xml
+++ b/account/pom.xml
@@ -97,13 +97,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <groups>setup,fast</groups>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
api/pom.xml 1(+0 -1)
diff --git a/api/pom.xml b/api/pom.xml
index de14404..ac7f6c9 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -58,7 +58,6 @@
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
-
</dependencies>
<build>
</build>
beatrix/pom.xml 7(+0 -7)
diff --git a/beatrix/pom.xml b/beatrix/pom.xml
index 31ed0b0..33a627e 100644
--- a/beatrix/pom.xml
+++ b/beatrix/pom.xml
@@ -108,13 +108,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <groups>fast,slow, stress</groups>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
diff --git a/beatrix/src/test/java/com/ning/billing/beatrix/integration/TestIntegration.java b/beatrix/src/test/java/com/ning/billing/beatrix/integration/TestIntegration.java
index 78655e1..01dead1 100644
--- a/beatrix/src/test/java/com/ning/billing/beatrix/integration/TestIntegration.java
+++ b/beatrix/src/test/java/com/ning/billing/beatrix/integration/TestIntegration.java
@@ -76,6 +76,7 @@ import com.ning.billing.invoice.api.InvoiceUserApi;
import com.ning.billing.util.clock.ClockMock;
import com.ning.billing.util.bus.BusService;
+@Test(groups = "slow")
@Guice(modules = {MockModule.class})
public class TestIntegration {
private static final int NUMBER_OF_DECIMALS = 4;
@@ -141,7 +142,7 @@ public class TestIntegration {
helper.initDb(utilDdl);
}
- @BeforeSuite(alwaysRun = true)
+ @BeforeSuite(groups = "slow")
public void setup() throws Exception{
setupMySQL();
@@ -164,7 +165,7 @@ public class TestIntegration {
accountUserApi = accountService.getAccountUserApi();
}
- @AfterSuite(alwaysRun = true)
+ @AfterSuite(groups = "slow")
public void tearDown() throws Exception {
lifecycle.fireShutdownSequencePriorEventUnRegistration();
busService.getBus().unregister(busHandler);
@@ -172,7 +173,7 @@ public class TestIntegration {
}
- @BeforeMethod(alwaysRun = true)
+ @BeforeMethod(groups = "slow")
public void setupTest() {
log.warn("\n");
@@ -182,7 +183,7 @@ public class TestIntegration {
cleanupData();
}
- @AfterMethod(alwaysRun = true)
+ @AfterMethod(groups = "slow")
public void cleanupTest() {
log.warn("DONE WITH TEST\n");
}
@@ -275,7 +276,7 @@ public class TestIntegration {
Thread.sleep(600000);
}
- @Test(groups = "stress", enabled = false)
+ @Test(groups = {"slow", "stress"}, enabled = false)
public void stressTest() throws Exception {
final int maxIterations = 7;
for (int curIteration = 0; curIteration < maxIterations; curIteration++) {
diff --git a/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java b/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
index fbc99df..fb61be7 100644
--- a/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
+++ b/catalog/src/test/java/com/ning/billing/catalog/TestVersionedCatalog.java
@@ -49,7 +49,7 @@ public class TestVersionedCatalog {
private final VersionedCatalogLoader loader = new VersionedCatalogLoader(new DefaultClock());
private VersionedCatalog vc;
- @BeforeClass(groups={"setup"})
+ @BeforeClass(groups={"fast"})
public void setUp() throws ServiceException {
vc = loader.load(Resources.getResource("versionedCatalog").toString());
}
entitlement/pom.xml 22(+0 -22)
diff --git a/entitlement/pom.xml b/entitlement/pom.xml
index a4fafd6..5c94937 100644
--- a/entitlement/pom.xml
+++ b/entitlement/pom.xml
@@ -133,13 +133,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <groups>fast,slow</groups>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
@@ -151,19 +144,4 @@
</plugin>
</plugins>
</build>
- <profiles>
- <profile>
- <id>test-stress</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <groups>stress</groups>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationMemory.java b/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationMemory.java
index 05d6fb5..d9aff08 100644
--- a/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationMemory.java
+++ b/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationMemory.java
@@ -23,6 +23,7 @@ import com.google.inject.Injector;
import com.google.inject.Stage;
import com.ning.billing.entitlement.glue.MockEngineModuleMemory;
+@Test(groups = "fast")
public class TestMigrationMemory extends TestMigration {
@Override
protected Injector getInjector() {
diff --git a/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationSql.java b/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationSql.java
index 84744d8..f1033c8 100644
--- a/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationSql.java
+++ b/entitlement/src/test/java/com/ning/billing/entitlement/api/migration/TestMigrationSql.java
@@ -23,6 +23,7 @@ import com.google.inject.Injector;
import com.google.inject.Stage;
import com.ning.billing.entitlement.glue.MockEngineModuleSql;
+@Test(groups = "slow")
public class TestMigrationSql extends TestMigration {
@Override
diff --git a/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java b/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
index 094faba..3674820 100644
--- a/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
+++ b/entitlement/src/test/java/com/ning/billing/entitlement/api/TestApiBase.java
@@ -113,7 +113,7 @@ public abstract class TestApiBase {
protected abstract Injector getInjector();
- @AfterClass(alwaysRun=true)
+ @AfterClass(alwaysRun = true)
public void tearDown() {
try {
busService.getBus().register(testListener);
@@ -124,7 +124,7 @@ public abstract class TestApiBase {
}
- @BeforeClass(alwaysRun=true)
+ @BeforeClass(alwaysRun = true)
public void setup() {
loadSystemPropertiesFromClasspath("/entitlement.properties");
@@ -178,7 +178,7 @@ public abstract class TestApiBase {
migrationApi = entitlementService.getMigrationApi();
}
- @BeforeMethod(alwaysRun=true)
+ @BeforeMethod(alwaysRun = true)
public void setupTest() {
log.warn("\n");
@@ -200,7 +200,7 @@ public abstract class TestApiBase {
((Engine)entitlementService).start();
}
- @AfterMethod(alwaysRun=true)
+ @AfterMethod(alwaysRun = true)
public void cleanupTest() {
((Engine)entitlementService).stop();
log.warn("DONE WITH TEST\n");
diff --git a/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java b/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
index 209d889..ef2ab2c 100644
--- a/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
+++ b/invoice/src/test/java/com/ning/billing/invoice/TestInvoiceDispatcher.java
@@ -60,6 +60,7 @@ import com.ning.billing.util.bus.BusService;
import com.ning.billing.util.globallocker.GlobalLocker;
import sun.security.util.BigInt;
+@Test(groups = "slow")
@Guice(modules = {MockModule.class})
public class TestInvoiceDispatcher {
@@ -83,7 +84,7 @@ public class TestInvoiceDispatcher {
- @BeforeSuite(alwaysRun = true)
+ @BeforeSuite(groups = "slow")
public void setup() throws IOException
{
@@ -108,7 +109,7 @@ public class TestInvoiceDispatcher {
}
- @Test(groups={"fast"}, enabled=true)
+ @Test(groups={"slow"}, enabled=true)
public void testDryrunInvoice() throws InvoiceApiException {
UUID accountId = UUID.randomUUID();
UUID subscriptionId = UUID.randomUUID();
pom.xml 34(+34 -0)
diff --git a/pom.xml b/pom.xml
index 55b2b9a..4fe0e0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -479,6 +479,40 @@
</build>
<profiles>
<profile>
+ <id>travis</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.11</version>
+ <configuration>
+ <groups>fast</groups>
+ <systemPropertyVariables>
+ <file.encoding>UTF-8</file.encoding>
+ <user.timezone>GMT</user.timezone>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>test-stress</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.11</version>
+ <configuration>
+ <groups>stress</groups>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
diff --git a/util/src/test/java/com/ning/billing/util/bus/TestEventBus.java b/util/src/test/java/com/ning/billing/util/bus/TestEventBus.java
index 85849c5..092cdc7 100644
--- a/util/src/test/java/com/ning/billing/util/bus/TestEventBus.java
+++ b/util/src/test/java/com/ning/billing/util/bus/TestEventBus.java
@@ -97,7 +97,7 @@ public class TestEventBus {
}
}
- @Test
+ @Test(groups = "slow")
public void testSimple() {
try {
@@ -116,7 +116,7 @@ public class TestEventBus {
}
}
- @Test
+ @Test(groups = "slow")
public void testDifferentType() {
try {
diff --git a/util/src/test/java/com/ning/billing/util/customfield/TestFieldStore.java b/util/src/test/java/com/ning/billing/util/customfield/TestFieldStore.java
index f7c16e4..9bc67dd 100644
--- a/util/src/test/java/com/ning/billing/util/customfield/TestFieldStore.java
+++ b/util/src/test/java/com/ning/billing/util/customfield/TestFieldStore.java
@@ -34,13 +34,13 @@ import com.ning.billing.util.customfield.dao.FieldStoreDao;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
-@Test(groups={"util"})
+@Test(groups = {"util", "slow"})
public class TestFieldStore {
Logger log = LoggerFactory.getLogger(TestFieldStore.class);
private final MysqlTestingHelper helper = new MysqlTestingHelper();
private IDBI dbi;
- @BeforeClass(alwaysRun = true)
+ @BeforeClass(groups = {"util", "slow"})
protected void setup() throws IOException {
// Health check test to make sure MySQL is setup properly
try {
@@ -57,7 +57,7 @@ public class TestFieldStore {
}
}
- @AfterClass(alwaysRun = true)
+ @AfterClass(groups = {"util", "slow"})
public void stopMysql()
{
helper.stopMysql();
diff --git a/util/src/test/java/com/ning/billing/util/globallocker/TestMysqlGlobalLocker.java b/util/src/test/java/com/ning/billing/util/globallocker/TestMysqlGlobalLocker.java
index 1fd8290..dfb18f7 100644
--- a/util/src/test/java/com/ning/billing/util/globallocker/TestMysqlGlobalLocker.java
+++ b/util/src/test/java/com/ning/billing/util/globallocker/TestMysqlGlobalLocker.java
@@ -38,6 +38,7 @@ import com.ning.billing.util.globallocker.LockFailedException;
import com.ning.billing.util.globallocker.MySqlGlobalLocker;
import com.ning.billing.util.globallocker.GlobalLocker.LockerService;
+@Test(groups = "slow")
@Guice(modules=TestMysqlGlobalLocker.TestMysqlGlobalLockerModule.class)
public class TestMysqlGlobalLocker {
@@ -47,13 +48,13 @@ public class TestMysqlGlobalLocker {
@Inject
private MysqlTestingHelper helper;
- @BeforeClass(alwaysRun=true)
+ @BeforeClass(groups = "slow")
public void setup() throws IOException {
helper.startMysql();
createSimpleTable(dbi);
}
- @AfterClass(alwaysRun=true)
+ @AfterClass(groups = "slow")
public void tearDown() {
helper.stopMysql();
}
diff --git a/util/src/test/java/com/ning/billing/util/notificationq/dao/TestNotificationSqlDao.java b/util/src/test/java/com/ning/billing/util/notificationq/dao/TestNotificationSqlDao.java
index cb01e00..8826953 100644
--- a/util/src/test/java/com/ning/billing/util/notificationq/dao/TestNotificationSqlDao.java
+++ b/util/src/test/java/com/ning/billing/util/notificationq/dao/TestNotificationSqlDao.java
@@ -45,6 +45,7 @@ import com.ning.billing.util.notificationq.dao.NotificationSqlDao.NotificationSq
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
+@Test(groups = "slow")
@Guice(modules = TestNotificationSqlDao.TestNotificationSqlDaoModule.class)
public class TestNotificationSqlDao {
@@ -66,7 +67,7 @@ public class TestNotificationSqlDao {
helper.initDb(ddl);
}
- @BeforeSuite(alwaysRun = true)
+ @BeforeSuite(groups = "slow")
public void setup() {
try {
startMysql();
@@ -76,14 +77,14 @@ public class TestNotificationSqlDao {
}
}
- @AfterSuite(alwaysRun = true)
+ @AfterSuite(groups = "slow")
public void stopMysql()
{
helper.stopMysql();
}
- @BeforeTest
+ @BeforeTest(groups = "slow")
public void cleanupDb() {
dbi.withHandle(new HandleCallback<Void>() {
diff --git a/util/src/test/java/com/ning/billing/util/notificationq/TestNotificationQueue.java b/util/src/test/java/com/ning/billing/util/notificationq/TestNotificationQueue.java
index fbcf8f9..73c9eaf 100644
--- a/util/src/test/java/com/ning/billing/util/notificationq/TestNotificationQueue.java
+++ b/util/src/test/java/com/ning/billing/util/notificationq/TestNotificationQueue.java
@@ -55,6 +55,7 @@ import com.ning.billing.util.clock.ClockMock;
import com.ning.billing.util.notificationq.NotificationQueueService.NotificationQueueHandler;
import com.ning.billing.util.notificationq.dao.NotificationSqlDao;
+@Test(groups = "slow")
@Guice(modules = TestNotificationQueue.TestNotificationQueueModule.class)
public class TestNotificationQueue {
Logger log = LoggerFactory.getLogger(TestNotificationQueue.class);
@@ -81,13 +82,13 @@ public class TestNotificationQueue {
helper.initDb(testDdl);
}
- @BeforeSuite(alwaysRun = true)
+ @BeforeSuite(groups = "slow")
public void setup() throws Exception {
startMysql();
dao = dbi.onDemand(DummySqlTest.class);
}
- @BeforeTest
+ @BeforeTest(groups = "slow")
public void beforeTest() {
dbi.withHandle(new HandleCallback<Void>() {
@@ -110,7 +111,7 @@ public class TestNotificationQueue {
* callback with the correct key when the time is ready
* @throws Exception
*/
- @Test(groups={"fast"}, enabled = true)
+ @Test(groups={"slow"}, enabled = true)
public void testSimpleNotification() throws Exception {
final Map<String, Boolean> expectedNotifications = new TreeMap<String, Boolean>();
@@ -174,7 +175,7 @@ public class TestNotificationQueue {
Assert.assertTrue(expectedNotifications.get(notificationKey.toString()));
}
- @Test
+ @Test(groups = "slow")
public void testManyNotifications() throws InterruptedException {
final Map<String, Boolean> expectedNotifications = new TreeMap<String, Boolean>();
@@ -261,7 +262,7 @@ public class TestNotificationQueue {
* callback with the correct key when the time is ready
* @throws Exception
*/
- @Test(groups={"fast"}, enabled = true)
+ @Test(groups={"slow"}, enabled = true)
public void testMultipleHandlerNotification() throws Exception {
final Map<String, Boolean> expectedNotificationsFred = new TreeMap<String, Boolean>();
diff --git a/util/src/test/java/com/ning/billing/util/tag/TestTagStore.java b/util/src/test/java/com/ning/billing/util/tag/TestTagStore.java
index c913791..b89a146 100644
--- a/util/src/test/java/com/ning/billing/util/tag/TestTagStore.java
+++ b/util/src/test/java/com/ning/billing/util/tag/TestTagStore.java
@@ -45,7 +45,7 @@ import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
-@Test(groups={"util"})
+@Test(groups={"util", "slow"})
public class TestTagStore {
private final static String ACCOUNT_TYPE = "ACCOUNT";
private final Clock clock = new DefaultClock();
diff --git a/util/src/test/java/com/ning/billing/util/validation/TestValidationManager.java b/util/src/test/java/com/ning/billing/util/validation/TestValidationManager.java
index b7e5bc6..829ec4a 100644
--- a/util/src/test/java/com/ning/billing/util/validation/TestValidationManager.java
+++ b/util/src/test/java/com/ning/billing/util/validation/TestValidationManager.java
@@ -39,7 +39,7 @@ public class TestValidationManager {
private ValidationManager vm;
- @BeforeClass(alwaysRun = true)
+ @BeforeClass(groups = "slow")
public void setup() throws IOException {
setupDatabase();
setupDao();
@@ -60,7 +60,7 @@ public class TestValidationManager {
helper.initDb(ddl.toString());
}
- @AfterClass(alwaysRun = true)
+ @AfterClass(groups = "slow")
public void tearDown() {
stopDatabase();
}
@@ -69,7 +69,7 @@ public class TestValidationManager {
helper.stopMysql();
}
- @Test
+ @Test(groups = "slow")
public void testRetrievingColumnInfo() {
Collection<ColumnInfo> columnInfoList = vm.getTableInfo(TABLE_NAME);
assertEquals(columnInfoList.size(), 4);
@@ -82,7 +82,7 @@ public class TestValidationManager {
assertEquals(numericColumnInfo.getPrecision(), 10);
}
- @Test
+ @Test(groups = "slow")
public void testSimpleConfiguration() {
String STRING_FIELD_2 = "column2";
String STRING_FIELD_2_PROPERTY = "stringField2";