You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/01/10 20:21:57 UTC

[GitHub] [accumulo] ctubbsii edited a comment on pull request #2410: Fix MiniAccumuloClusterImpl.verifyUp()

ctubbsii edited a comment on pull request #2410:
URL: https://github.com/apache/accumulo/pull/2410#issuecomment-1009309410


   > @ctubbsii - I removed the use of ZooReaderWriter from MiniAccumuloClusterImpl.verifyUp. Instead, it uses the Native ZK client. Change [here](https://github.com/dlmarion/accumulo/commit/d514b7be3e6924ed23a618e36657989f9eaf340b). Running AccumuloClientIT on the command line yeilds:
   > 
   > ```
   > java.lang.AssertionError: expected:<CLIENT> but was:<SERVER>
   > 	at org.junit.Assert.fail(Assert.java:89)
   > 	at org.junit.Assert.failNotEquals(Assert.java:835)
   > 	at org.junit.Assert.assertEquals(Assert.java:120)
   > 	at org.junit.Assert.assertEquals(Assert.java:146)
   > 	at org.apache.accumulo.test.functional.AccumuloClientIT.testClose(AccumuloClientIT.java:191)
   > ```
   > 
   > I'm not sure what's going on here.
   
   The call to `getServerContext` is the problematic part. You avoided it by removing my `getServerContext().getZooReaderWriter()` and `getServerContext().getZooKeeperRoot()`, but then you added it back in for `getServerContext().getConfiguration()` and `getServerContext().getInstanceID()`.
   
   If the solution is to use ZooKeeper's API directly instead of our own, then we have to do it using the config for MiniAccumuloClusterImpl without instantiating the ServerContext because that's the part that sets the singleton mode to SERVER. This is timing based anyway... because for most tests, `getServerContext()` will eventually be called. We just can't have it called before `verifyUp()` because some of the tests check for the singleton mode (haven't looked into why).


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org