Github user dragonsinth commented on the pull request:
https://github.com/apache/curator/pull/17#issuecomment-50921130
Just to be sure, I went back and instrumented the entire refresh() section
like this:
```
private void refresh() throws Exception
{
for ( int i = 0; i < 20; ++i )
{
executorService.submit(new Callable<Void>()
{
@Override
public Void call() throws Exception
{
outstandingOps.addAndGet(2);
Thread.sleep(random.nextInt(30));
doRefreshData();
Thread.sleep(random.nextInt(30));
doRefreshChildren();
return null;
}
});
}
}
private void doRefreshChildren() throws Exception
{
GetChildrenBuilder children1 = client.getChildren();
Thread.sleep(random.nextInt(30));
BackgroundPathable<List<String>> listBackgroundPathable =
children1.usingWatcher(this);
Thread.sleep(random.nextInt(30));
Pathable<List<String>> listPathable =
listBackgroundPathable.inBackground(this);
Thread.sleep(random.nextInt(30));
listPathable.forPath(path);
}
```
All the test still pass (just way more slowly) despite there being 20
threads racing each other on every op.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---