You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "thomasmueller (via GitHub)" <gi...@apache.org> on 2026/03/04 14:20:46 UTC

[PR] OAK-12122: add fixed seed and improve logging in DataStoreCommandTest [jackrabbit-oak]

thomasmueller opened a new pull request, #2781:
URL: https://github.com/apache/jackrabbit-oak/pull/2781

   Made-with: Cursor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-12122: add fixed seed and improve logging in DataStoreCommandTest [jackrabbit-oak]

Posted by "rishabhdaim (via GitHub)" <gi...@apache.org>.
rishabhdaim commented on code in PR #2781:
URL: https://github.com/apache/jackrabbit-oak/pull/2781#discussion_r2885337732


##########
oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java:
##########
@@ -901,12 +901,44 @@ private static void assertFileEquals(File dump, String prefix, Set<String> blobs
     private static void assertFileEquals(File dump, String prefix, Set<String> blobsAdded, String dirPrefix)
         throws IOException {
         File file = (dirPrefix == null) ? filterFiles(dump, prefix) : filterFiles(dump, dirPrefix, prefix);
-        Assert.assertNotNull(file);
+        if (file == null || !file.exists()) {
+            logFilesInDump(dump, prefix);
+        }
+        Assert.assertNotNull("Expected file with prefix " + prefix + " in " + dump.getAbsolutePath(), file);
         Assert.assertTrue(file.exists());
         assertEquals(blobsAdded,
             FileIOUtils.readStringsAsSet(new FileInputStream(file), true));
     }
 
+    private static void logFilesInDump(File dump, String prefix) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Expected file with prefix \"").append(prefix).append("\" not found in ")
+                .append(dump.getAbsolutePath()).append(". Contents:");
+        if (!dump.exists()) {
+            sb.append(" directory does not exist");
+        } else {
+            appendFilesWithSizes(sb, dump, "");
+        }
+        log.warn(sb.toString());

Review Comment:
   Just a nit-pick.
   
   ```suggestion
           log.warn("{}", sb);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-12122: add fixed seed and improve logging in DataStoreCommandTest [jackrabbit-oak]

Posted by "thomasmueller (via GitHub)" <gi...@apache.org>.
thomasmueller merged PR #2781:
URL: https://github.com/apache/jackrabbit-oak/pull/2781


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-12122: add fixed seed and improve logging in DataStoreCommandTest [jackrabbit-oak]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #2781:
URL: https://github.com/apache/jackrabbit-oak/pull/2781#issuecomment-3998579801

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2781)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org