Github user adamjshook commented on the issue:
https://github.com/apache/accumulo/pull/254
I've been reading up on `Executors#sameThreadExecutor`, and I don't think
we can use this here since it runs the task prior to getting any `Future`. The
timeout logic would not kick in until the task is finished.
The task has to be run in a separate thread while the main thread idles to
trigger the timeout.
Additionally, I'm having a bit of trouble getting a unit test I am pleased
with. I've made one that runs, but there is a race condition there where it'll
either not run the task at all or the task runs but it throws and logs a
`Connection refused` error because there is no server running to receive any
work. You can take a look at the commit
[here](https://github.com/adamjshook/accumulo/commit/e0c9ca76982aaa327dba0084e82b339383dfd09c).
Either way the test passes since the `Status` returned is the same, but it
isn't a very good test since the behavior isn't really defined. I think we are
a bit too high-level here for a unit test.
---
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.
---