You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2016/08/26 19:52:06 UTC

incubator-tamaya git commit: TAMAYA-171: Fixed consul tests.

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master bf9007a4e -> ad44f6865


TAMAYA-171: Fixed consul tests.


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

Branch: refs/heads/master
Commit: ad44f6865f37981c117d83f7efc985a16ae4d987
Parents: bf9007a
Author: anatole <an...@apache.org>
Authored: Fri Aug 26 18:39:39 2016 +0200
Committer: anatole <an...@apache.org>
Committed: Fri Aug 26 18:39:39 2016 +0200

----------------------------------------------------------------------
 .../org/apache/tamaya/etcd/ConsulWriteTest.java     | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ad44f686/modules/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
----------------------------------------------------------------------
diff --git a/modules/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java b/modules/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
index 202d0e3..ec930b9 100644
--- a/modules/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
+++ b/modules/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
@@ -20,6 +20,7 @@ package org.apache.tamaya.etcd;
 
 import com.google.common.net.HostAndPort;
 import org.apache.tamaya.consul.ConsulPropertySource;
+import org.apache.tamaya.mutableconfig.spi.ConfigChangeRequest;
 import org.junit.BeforeClass;
 
 import java.net.MalformedURLException;
@@ -49,8 +50,9 @@ public class ConsulWriteTest {
     public void testSetNormal() throws Exception {
         if (!execute) return;
         String taID = UUID.randomUUID().toString();
-        propertySource.put(taID, "testSetNormal", taID.toString());
-        propertySource.commitTransaction(taID);
+        ConfigChangeRequest request = new ConfigChangeRequest("testSetNormal");
+        request.put(taID, "testSetNormal");
+        propertySource.applyChange(request);
     }
 
 
@@ -58,12 +60,14 @@ public class ConsulWriteTest {
     public void testDelete() throws Exception {
         if(!execute)return;
         String taID = UUID.randomUUID().toString();
-        propertySource.put(taID, "testDelete", taID.toString());
-        propertySource.commitTransaction(taID);
+        ConfigChangeRequest request = new ConfigChangeRequest("testDelete");
+        request.put(taID, "testDelete");
+        propertySource.applyChange(request);
         assertEquals(propertySource.get("testDelete").getValue(), taID.toString());
         assertNotNull(propertySource.get("_testDelete.createdIndex"));
-        propertySource.remove(taID, "testDelete");
-        propertySource.commitTransaction(taID);
+        request = new ConfigChangeRequest("testDelete2");
+        request.remove("testDelete");
+        propertySource.applyChange(request);
         assertNull(propertySource.get("testDelete"));
     }