mjwall commented on pull request #2293:
URL: https://github.com/apache/accumulo/pull/2293#issuecomment-931653551


   > @mjwall I pulled these changes locally and experimented with writing the 
following unit test and it passed.
   > 
   > ```java
   >   @Test
   >   public void testMissingTableIds() throws Exception {
   >     GarbageCollectionAlgorithm gca = new GarbageCollectionAlgorithm();
   > 
   >     TestGCE gce = new TestGCE();
   > 
   >     gce.candidates.add("hdfs://foo.com:6000/user/foo/tables/a/t-0/F00.rf");
   > 
   >     gce.addFileReference("a", null, 
"hdfs://foo.com:6000/user/foo/tables/a/t-0/F00.rf");
   >     gce.addFileReference("c", null, 
"hdfs://foo.com:6000/user/foo/tables/c/t-0/F00.rf");
   > 
   >     // the following table ids must be seen in the references
   >     gce.tableIds.add("a");
   >     gce.tableIds.add("b");
   >     gce.tableIds.add("c");
   >     gce.tableIds.add("d");
   > 
   >     String msg = Assert.assertThrows(RuntimeException.class, () -> 
gca.collect(gce)).getMessage();
   >     Assert.assertTrue(msg, (msg.contains("[b, d]") || msg.contains("[d, 
b]"))
   >         && msg.contains("Missed checking tables"));
   >   }
   > ```
   
   Sweet, thanks


-- 
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