brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [2/9] git commit: Fix JcloudsObjectStoreAccessorWriterTest
Date Thu, 06 Nov 2014 10:36:51 GMT
Fix JcloudsObjectStoreAccessorWriterTest


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/310ce260
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/310ce260
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/310ce260

Branch: refs/heads/master
Commit: 310ce2606d8a0b08aba89cffd4311a134aec94df
Parents: c323b00
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Nov 5 22:45:59 2014 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Nov 5 22:47:14 2014 +0000

----------------------------------------------------------------------
 .../PersistenceStoreObjectAccessorWriterTestFixture.java     | 2 +-
 .../jclouds/JcloudsObjectStoreAccessorWriterTest.java        | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/310ce260/core/src/test/java/brooklyn/entity/rebind/persister/PersistenceStoreObjectAccessorWriterTestFixture.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/rebind/persister/PersistenceStoreObjectAccessorWriterTestFixture.java
b/core/src/test/java/brooklyn/entity/rebind/persister/PersistenceStoreObjectAccessorWriterTestFixture.java
index 1e96da1..6cdb32d 100644
--- a/core/src/test/java/brooklyn/entity/rebind/persister/PersistenceStoreObjectAccessorWriterTestFixture.java
+++ b/core/src/test/java/brooklyn/entity/rebind/persister/PersistenceStoreObjectAccessorWriterTestFixture.java
@@ -89,7 +89,7 @@ public abstract class PersistenceStoreObjectAccessorWriterTestFixture {
         accessor.waitForCurrentWrites(TIMEOUT);
         Date write2 = accessor.getLastModifiedDate();
         Assert.assertNotNull(write2);
-        Assert.assertTrue(write2.after(write1), "dates are "+write1+" and "+write2);
+        Assert.assertTrue(write2.after(write1), "dates are "+write1+" ("+write1.getTime()+")
and "+write2+" ("+write2.getTime()+") ");
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/310ce260/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
index 828c8f3..8a03501 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
@@ -33,6 +33,7 @@ import brooklyn.entity.rebind.persister.StoreObjectAccessorLocking;
 import brooklyn.management.ha.HighAvailabilityMode;
 import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.text.Identifiers;
+import brooklyn.util.time.Duration;
 
 @Test(groups={"Live", "Live-sanity"})
 public class JcloudsObjectStoreAccessorWriterTest extends PersistenceStoreObjectAccessorWriterTestFixture
{
@@ -60,6 +61,13 @@ public class JcloudsObjectStoreAccessorWriterTest extends PersistenceStoreObject
         return new StoreObjectAccessorLocking(store.newAccessor("sample-file-"+Identifiers.makeRandomId(4)));
     }
 
+    @Override
+    protected Duration getLastModifiedResolution() {
+        // Not sure what timing resolution is on things like Softlayer's Swift.
+        // It passed for Aled repeatedly on 2014-11-05 with 2 seconds.
+        return Duration.seconds(2);
+    }
+    
     protected int biggishSize() {
         // bit smaller since it's actually uploading here!
         return 10000;


Mime
View raw message