killbill-memoizeit

Fix test issue because of recent changes : new Permission and

6/28/2017 11:31:49 PM

Details

diff --git a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
index 1506cc6..d20771a 100644
--- a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
+++ b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
@@ -153,12 +153,11 @@ public class TestCatalog extends TestJaxrsBase {
         Assert.assertEquals(foundBasePlans, allBasePlans);
     }
 
-    @Test(groups = "slow", description = "Try to retrieve a json version of the catalog with an invalid date",
-            expectedExceptions = KillBillClientException.class,
-            expectedExceptionsMessageRegExp = "There is no catalog version that applies for the given date.*")
-    public void testCatalogInvalidDate() throws Exception {
+    @Test(groups = "slow", description = "Try to retrieve catalog with an effective date in the past")
+    public void testCatalogWithEffectiveDateInThePast() throws Exception {
         final List<Catalog> catalogsJson = killBillClient.getJSONCatalog(DateTime.parse("2008-01-01"), requestOptions);
-        Assert.fail();
+        // We expect to see our catalogTest.xml (date in the past returns the first version. See #760
+        Assert.assertEquals(catalogsJson.size(), 1);
     }
 
     @Test(groups = "slow", description = "Can create a simple Plan into a per-tenant catalog")
diff --git a/profiles/killbill/src/test/resources/killbill.properties b/profiles/killbill/src/test/resources/killbill.properties
index 776243b..4474ab4 100644
--- a/profiles/killbill/src/test/resources/killbill.properties
+++ b/profiles/killbill/src/test/resources/killbill.properties
@@ -34,4 +34,6 @@ org.killbill.security.shiroNbHashIterations=10
 org.killbill.tenant.broadcast.rate=1s
 
 # exponential delay retries for push notifications
-org.killbill.billing.server.notifications.retries=15m,1h,1d,2d
\ No newline at end of file
+org.killbill.billing.server.notifications.retries=15m,1h,1d,2d
+
+org.killbill.server.test.mode=true
\ No newline at end of file