New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add integration test that ensures that server process does not start against newer version of accumulo. #4513
base: 2.1
Are you sure you want to change the base?
Conversation
MiniAccumuloClusterImpl.verifyUp (called from start) should throw an IllegalStateException if the expected processes are not running. |
test/src/main/java/org/apache/accumulo/test/ServerVersionIT.java
Outdated
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/ServerVersionIT.java
Outdated
Show resolved
Hide resolved
// Check to see if both paths exist at the sametime | ||
assertTrue(fs.exists(rootPath)); | ||
assertTrue(fs.exists(newPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to move this check before we check for the timeout
ExecutorService executor = Executors.newSingleThreadExecutor(); | ||
Future<?> future = executor.submit(() -> { | ||
for (ServerType st : ServerType.values()) { | ||
try { | ||
getCluster().getClusterControl().start(st); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
}); | ||
// Check to see if servers fail to start | ||
assertThrows(TimeoutException.class, () -> future.get(20, TimeUnit.SECONDS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will only check that the first ServerType
in ServerType.values()
will timeout. We might want to create a future for each ServerType
and check that each one times out. That will make this test pretty long but will make sure that none of them start up.
A more descriptive name for this IT might be better. |
At the current moment, checking for errors while each server type starts up fails.
We should be expecting them to throw errors during start up since it should detect that there is a different version of hdfs, but at the moment they are not giving errors.
issue #4268