Skip to content
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

[ML] Full cluster restart tests for migration #36593

Conversation

davidkyle
Copy link
Member

Similar to the upgrade tests in #36425

Creates jobs in the old cluster opening one of them, then in the upgraded cluster asserts that the closed jobs have been migrated and can be opened. Asserts that jobs left open during upgrade get an assignment

@davidkyle davidkyle added the :ml Machine learning label Dec 13, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@davidkyle
Copy link
Member Author

run gradle build tests 2

@davidkyle davidkyle force-pushed the migration-full-cluster-restart-tests branch from 6dc37a7 to aabbdee Compare December 13, 2018 17:43
@davidkyle davidkyle mentioned this pull request Dec 14, 2018
43 tasks
assertEquals("opened", XContentMapValues.extractValue("state", jobStats.get(0)));
assertThat((String)XContentMapValues.extractValue("assignment_explanation", jobStats.get(0)), isEmptyOrNullString());
assertNotNull(XContentMapValues.extractValue("node", jobStats.get(0)));
} catch (IOException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to ignore IOExceptions here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the assert busy will retry and eventually timeout, either way the test will fail but I admit the cause will be lost

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't do it elsewhere I'll clean that up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an exception other than an AssertionError will stop the busy loop. So if an IOException can be thrown that shouldn't terminate the busy loop then it needs to be caught here. But maybe there isn't.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes assert busy only catches AssertionError and the IOException should fail the test and not be caught here. I'm gonna blame intellij and remove the try...catch

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidkyle davidkyle merged commit 2e2495c into elastic:feature-jindex-6x Dec 14, 2018
@davidkyle davidkyle deleted the migration-full-cluster-restart-tests branch December 14, 2018 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants