You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2016/09/16 22:03:55 UTC

[45/50] [abbrv] incubator-tamaya-extensions git commit: TAMAYA-171: Fixed consul tests.

TAMAYA-171: Fixed consul tests.


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

Branch: refs/heads/master
Commit: 30c4144499082f98d4e3ace9c2766a05eb452712
Parents: 717a4bf
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-extensions/blob/30c41444/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
----------------------------------------------------------------------
diff --git a/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java b/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
index 202d0e3..ec930b9 100644
--- a/integration/consul/src/test/java/org/apache/tamaya/etcd/ConsulWriteTest.java
+++ b/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"));
     }