jmark99 commented on a change in pull request #409: ACCUMULO-4791 fix 
setshelliter usage
URL: https://github.com/apache/accumulo/pull/409#discussion_r178362328
 
 

 ##########
 File path: test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
 ##########
 @@ -1737,60 +1737,112 @@ public void scansWithClassLoaderContext() throws 
Exception {
       assertTrue(true);
     }
     ts.exec("createtable t");
+    // Assert that the TabletServer does not know anything about our class
+    String result = ts.exec("setiter -scan -n reverse -t t -p 21 -class 
org.apache.accumulo.test.functional.ValueReversingIterator");
+    assertTrue(result.contains("class not found"));
     make10();
     setupFakeContextPath();
-    // Add the context to the table so that setscaniter works. After 
setscaniter succeeds, then
-    // remove the property from the table.
-    ts.exec("config -s " + Property.VFS_CONTEXT_CLASSPATH_PROPERTY + 
FAKE_CONTEXT + "=" + FAKE_CONTEXT_CLASSPATH);
-    ts.exec("config -t t -s table.classpath.context=" + FAKE_CONTEXT);
-    ts.exec("setscaniter -n reverse -t t -p 21 -class 
org.apache.accumulo.test.functional.ValueReversingIterator");
-    String result = ts.exec("scan -np -b row1 -e row1");
+    // Add the context to the table so that setiter works.
+    result = ts.exec("config -s " + Property.VFS_CONTEXT_CLASSPATH_PROPERTY + 
FAKE_CONTEXT + "=" + FAKE_CONTEXT_CLASSPATH);
+    assertEquals("root@miniInstance t> config -s " + 
Property.VFS_CONTEXT_CLASSPATH_PROPERTY + FAKE_CONTEXT + "=" + 
FAKE_CONTEXT_CLASSPATH + "\n", result);
 
 Review comment:
   Keith, when I first checked out this ticket I was working on a fix for 2.0.0 
only. Later I realized it had a 1.9 fix version as well. If you diff the 
scansWithClassLoaderContext method with the current master you will see they 
are identical (except for the constant I created today for the iterator 
classname). I never reverted the code to the 1.8/1.9 version which is slightly 
different. So the code you see is the current version of the test in master.  I 
say all of that in order to say I can't really shed any enlightenment on what 
is going on.  I was actually going to ask the group to see if someone could 
explain the ultimate purpose of the test. 

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


With regards,
Apache Git Services

Reply via email to