-
Notifications
You must be signed in to change notification settings - Fork 4
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
89 [QA] lead reinition integration test #233
Conversation
will merge after #235 |
@@ -72,6 +72,12 @@ public void initializeResources() throws SQLException { | |||
@AfterMethod | |||
public void cleanupResources() throws SQLException { | |||
TEST_NUMBER++; | |||
//todo issue #232 fix increment topic partition name for tests on milty jvm |
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.
Typo: should be "multi" JVM
processes = processes.stream().filter(Process::isAlive).collect(Collectors.toList()); | ||
try { | ||
for (int gridNumber = processes.size(); gridNumber < clusterSize; gridNumber++) { | ||
processes.add(startJVM("node-" + gridNumber, IgniteStarter.class)); | ||
for (int gridNumber = 0; gridNumber < count && processes.size() < clusterSize; gridNumber++) { |
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.
In which cases count != clusterSize ?
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.
it is restriction on top for number of waking up server nodes
writeToCache.stop(); | ||
long expectedLastDenseCommitted = writeToCache.getCount() - 1; | ||
|
||
//wait what lead state saved |
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.
"wait that lead state was saved" will be more correct
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.
"Wait for lead state to be saved" possibly?
@@ -72,6 +72,12 @@ public void initializeResources() throws SQLException { | |||
@AfterMethod | |||
public void cleanupResources() throws SQLException { | |||
TEST_NUMBER++; | |||
//todo issue #232 fix increment topic partition name for tests on milty jvm | |||
/* possible solution |
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.
May be remove this commented out code?
public void waitStartServerNodes() { | ||
IgniteCluster cluster = clientNode.cluster(); | ||
do { | ||
Uninterruptibles.sleepUninterruptibly(AWAIT_TIME, TimeUnit.MILLISECONDS); |
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.
May be consider using Awaitility for such tasks - https://github.com/awaitility/awaitility? - as we already have a bunch of them - Discussion.
writeTask.interrupt(); | ||
} | ||
|
||
public long getCount() { |
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.
Why long if count was declared as int?
// this test work if run it separate only | ||
//@Test(timeOut = TEST_TIMEOUT) | ||
public void leadChangedStateAfterDied() throws InterruptedException { | ||
awaitStartAllServerNodes(); |
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.
May be add a couple of newlines in this method to split it in steps?
fixed #89