keith-turner commented on code in PR #4776:
URL: https://github.com/apache/accumulo/pull/4776#discussion_r1695800301


##########
test/src/main/java/org/apache/accumulo/test/ScanServerMetadataEntriesIT.java:
##########
@@ -231,43 +231,42 @@ public void testGcRunScanServerReferences() throws 
Exception {
         Iterator<Entry<Key,Value>> iter = scanner.iterator();
         assertTrue(iter.hasNext());
         assertNotNull(iter.next());
-
-        List<Entry<Key,Value>> metadataEntries = null;
-        try (Scanner scanner2 =
-            client.createScanner(AccumuloTable.SCAN_REF.tableName(), 
Authorizations.EMPTY)) {
-          metadataEntries = 
scanner2.stream().distinct().collect(Collectors.toList());
-        }
-        assertEquals(fileCount, metadataEntries.size());
-        metadataEntries.forEach(e -> log.info("{}", e.getKey()));
-
-        Set<String> metadataScanFileRefs = new HashSet<>();
-        metadataEntries.forEach(m -> {
-          String file = m.getKey().getRow().toString();
-          metadataScanFileRefs.add(file);
-        });
-        assertEquals(fileCount, metadataScanFileRefs.size());
-
-        assertEquals(fileCount, 
ctx.getAmple().scanServerRefs().list().count());
-        List<Reference> refs;
-        try (Stream<Reference> references = gc.getReferences()) {
-          refs = references.collect(Collectors.toList());
-        }
-        assertTrue(refs.size() > fileCount * 2);
-        List<Reference> tableRefs =
-            refs.stream().filter(r -> r.getTableId().equals(tid) && 
!r.isDirectory())
-                .peek(r -> 
assertTrue(metadataScanFileRefs.contains(r.getMetadataPath())))
-                .collect(Collectors.toList());
-        log.info("Reference List:{}", tableRefs);
-        // There should be 6 references here. 3 for the table file entries, 
and 3 for the scan
-        // server references
-        assertEquals(fileCount * 2, tableRefs.size());
-
-        Set<String> deduplicatedReferences =
-            
tableRefs.stream().map(Reference::getMetadataPath).collect(Collectors.toSet());
-
-        assertEquals(fileCount, deduplicatedReferences.size());
       }
 
+      List<Entry<Key,Value>> metadataEntries = null;
+      try (Scanner scanner2 =
+          client.createScanner(AccumuloTable.SCAN_REF.tableName(), 
Authorizations.EMPTY)) {
+        metadataEntries = 
scanner2.stream().distinct().collect(Collectors.toList());
+      }
+      assertEquals(fileCount, metadataEntries.size());
+      metadataEntries.forEach(e -> log.info("{}", e.getKey()));
+
+      Set<String> metadataScanFileRefs = new HashSet<>();
+      metadataEntries.forEach(m -> {
+        String file = m.getKey().getColumnQualifier().toString();

Review Comment:
   Could this test do `new ScanServerRefTabletFile(m.getKey()).getFilePath()`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to