keith-turner commented on a change in pull request #409: ACCUMULO-4791 fix
setshelliter usage
URL: https://github.com/apache/accumulo/pull/409#discussion_r178386791
##########
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:
I think this particular test is checking the following scenario work
correctly for different versions of an iterator with the same name.
* Configure a table with a classpath context that contains one version of
an iterator
* Configure a scan iter with a classpath context that contains another
version of the same iterator
So in this case there are two jars that contain different versions of
ValueReversingIterator. This test ensures that the correct one is picked up
according to config.
----------------------------------------------------------------
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