-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Graph] Fix functional tests #47053
[Graph] Fix functional tests #47053
Conversation
Pinging @elastic/kibana-app |
@@ -47,67 +46,57 @@ export default function({ getService, getPageObjects }: FtrProviderContext) { | |||
'/blog/wp-admin/', | |||
]; | |||
|
|||
const expectedConnectionWidth: Record<string, Record<string, number>> = { | |||
'/blog/wp-admin/': { wp: 2, blog: 5.51581 }, | |||
const expectedConnections: Record<string, Record<string, boolean>> = { |
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.
After syncing with @markharwood it doesn't make sense to validate specific line lengths because the exact numbers can change because of a lot of things.
@@ -122,11 +111,15 @@ export default function({ getService, getPageObjects }: FtrProviderContext) { | |||
const { nodes } = await PageObjects.graph.getGraphObjects(); | |||
const circlesText = nodes.map(({ label }) => label); | |||
expect(circlesText.length).to.equal(expectedNodes.length); | |||
expect(circlesText).to.eql(expectedNodes); | |||
circlesText.forEach(circleText => { |
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.
Don't validate the order of nodes because it doesn't matter
💚 Build Succeeded |
Jenkins, test this |
💚 Build Succeeded |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
Code LGTM, tested locally, no fails, however, it didn't fail in my environment before
💔 Build Failed |
💚 Build Succeeded |
Jenkins, test this |
💚 Build Succeeded |
@elasticmachine merge upstream |
💔 Build Failed |
Jenkins, test this. Flaky unrelated test |
💚 Build Succeeded |
Hey @flash1293
If it is a timing issue, maybe you replace sleep with smth like
test PR #47555 Upd: looks like |
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.
LGTM - If we find flakiness in this test going forward we need to do 2 things;
- make sure we have API tests for Graph (maybe with the same data set) and see if we get the exact same response from the API every time
- trim the test down until it's reliable. It's better to have some functional test of graph than none.
…kibana into graph/enable-functional-tests
@dmlemeshko I tested my stabilization with 20 runs here #47592 , no failures EDIT: Merged in your test commit on accident, reverting and re-running. |
💔 Build Failed |
This reverts commit 4bfaa4f.
💚 Build Succeeded |
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.
LGTM. I didn't test it locally, but 20 successful runs on CI is a good sign.
Fixes #45322 #45321 #45317
Re-enables Graph functional tests with retries in places where route changes happen (because they are not reliable in all scenarios).
Also accounts for UI changes done in the meantime.