You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/29 05:12:19 UTC

[GitHub] sijie closed pull request #1300: [dlog] Fix TestZKLogStreamMetadataStore

sijie closed pull request #1300: [dlog] Fix TestZKLogStreamMetadataStore
URL: https://github.com/apache/bookkeeper/pull/1300
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/stream/distributedlog/core/src/test/java/org/apache/distributedlog/impl/metadata/TestZKLogStreamMetadataStore.java b/stream/distributedlog/core/src/test/java/org/apache/distributedlog/impl/metadata/TestZKLogStreamMetadataStore.java
index 018293071..1a5d18b56 100644
--- a/stream/distributedlog/core/src/test/java/org/apache/distributedlog/impl/metadata/TestZKLogStreamMetadataStore.java
+++ b/stream/distributedlog/core/src/test/java/org/apache/distributedlog/impl/metadata/TestZKLogStreamMetadataStore.java
@@ -485,25 +485,25 @@ public void testGetLogSegments() throws Exception {
     @Test(timeout = 60000)
     public void testGetMissingPathsRecursive() throws Exception {
         List<String> missingPaths = FutureUtils.result(
-            getMissingPaths(zkc, uri, "path/to/log"));
+            getMissingPaths(zkc, uri, "path_missing/to/log"));
 
         assertEquals(
             Lists.newArrayList(
-                uri.getPath() + "/path/to/log",
-                uri.getPath() + "/path/to",
-                uri.getPath() + "/path"
+                uri.getPath() + "/path_missing/to/log",
+                uri.getPath() + "/path_missing/to",
+                uri.getPath() + "/path_missing"
             ),
             missingPaths);
     }
 
     @Test(timeout = 60000)
     public void testGetMissingPathsRecursive2() throws Exception {
-        String path = uri.getPath() + "/path/to/log";
+        String path = uri.getPath() + "/path_missing2/to/log";
         ZkUtils.createFullPathOptimistic(
             zkc.get(), path, EMPTY_BYTES, zkc.getDefaultACL(), CreateMode.PERSISTENT);
 
         List<String> missingPaths = FutureUtils.result(
-            getMissingPaths(zkc, uri, "path/to/log"));
+            getMissingPaths(zkc, uri, "path_missing2/to/log"));
 
         assertEquals(
             Collections.emptyList(),
@@ -523,7 +523,7 @@ public void testGetMissingPathsFailure() throws Exception {
         }).when(mockZk).exists(anyString(), anyBoolean(), any(StatCallback.class), any());
 
         try {
-            FutureUtils.result(getMissingPaths(mockZkc, uri, "path/to/log"));
+            FutureUtils.result(getMissingPaths(mockZkc, uri, "path_failure/to/log_failure"));
             fail("Should fail on getting missing paths on zookeeper exceptions.");
         } catch (ZKException zke) {
             assertEquals(Code.BADVERSION, zke.getKeeperExceptionCode());
@@ -543,7 +543,7 @@ public void testRenameLog() throws Exception {
             logIdentifier,
             numSegments);
 
-        String newLogName = "path/to/new/" + logName;
+        String newLogName = "path_rename/to/new/" + logName;
         FutureUtils.result(metadataStore.renameLog(uri, logName, newLogName));
     }
 
@@ -559,7 +559,7 @@ public void testRenameLogExists() throws Exception {
             logIdentifier,
             numSegments);
 
-        String newLogName = "path/to/new/" + logName;
+        String newLogName = "path_rename_exists/to/new/" + logName;
         createLog(
             zkc,
             uri,
@@ -587,7 +587,7 @@ public void testRenameLockedLog() throws Exception {
         String lockPath = logRootPath + LOCK_PATH;
         zkc.get().create(lockPath + "/test", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_SEQUENTIAL);
 
-        String newLogName = "path/to/new/" + logName;
+        String newLogName = "path_rename_locked/to/new/" + logName;
         FutureUtils.result(metadataStore.renameLog(uri, logName, newLogName));
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services