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

 ##########
 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);
+
+    result = ts.exec("config -t t -s table.classpath.context=" + FAKE_CONTEXT);
+    assertEquals("root@miniInstance t> config -t t -s 
table.classpath.context=" + FAKE_CONTEXT + "\n", result);
+
+    result = ts.exec("setshelliter -pn baz -n reverse -p 21 -class 
org.apache.accumulo.test" + ".functional.ValueReversingIterator");
 
 Review comment:
   It is. Would you suggest we keep the existing use of setscaniter in the 
tests or update them?

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