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

[TEST] NoMasterNodeIT.testNoMasterActions fails #24369

Closed
ywelsch opened this issue Apr 27, 2017 · 6 comments
Closed

[TEST] NoMasterNodeIT.testNoMasterActions fails #24369

ywelsch opened this issue Apr 27, 2017 · 6 comments
Assignees
Labels
>test Issues or PRs that are addressing/adding tests

Comments

@ywelsch
Copy link
Contributor

ywelsch commented Apr 27, 2017

This test sporadically fails when it runs on a CI machine that slows down a bit. The test relies on timing, which is a big NONO:

long now = System.currentTimeMillis();
try {
    builder.get();
    fail("Expected ClusterBlockException");
} catch (ClusterBlockException e) {
    if (indexShouldBeAutoCreated) {
        // timeout is 200
        assertThat(System.currentTimeMillis() - now, greaterThan(timeout.millis() - 50));
        assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE));
    } else {
        // timeout is 5000
        assertThat(System.currentTimeMillis() - now, lessThan(timeout.millis() + 300));
    }
}

Failure:

ERROR   33.8s J0 | NoMasterNodeIT.testNoMasterActions <<< FAILURES!
   > Throwable #1: java.lang.AssertionError: 
   > Expected: a value less than <250L>
   >      but: <269L> was greater than <250L>
   > 	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
   > 	at org.elasticsearch.cluster.NoMasterNodeIT.checkWriteAction(NoMasterNodeIT.java:182)
   > 	at org.elasticsearch.cluster.NoMasterNodeIT.testNoMasterActions(NoMasterNodeIT.java:127)
   > 	at java.lang.Thread.run(Thread.java:745)Throwable #2: MasterNotDiscoveredException[null]
   > 	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$4.onTimeout(TransportMasterNodeAction.java:209)
...

Build: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.4+multijob-windows-compatibility/46/consoleFull

@ywelsch ywelsch added the >test Issues or PRs that are addressing/adding tests label Apr 27, 2017
@javanna
Copy link
Member

javanna commented May 1, 2017

@javanna
Copy link
Member

javanna commented May 1, 2017

This has been failing more frequently over the last couple of days:

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-windows-compatibility/82/console

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-windows-compatibility/77/console

Suspicious that all of these failures on Windows and 5.x.

@abeyad
Copy link

abeyad commented May 22, 2017

Another failure on Windows, 5.x: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-windows-compatibility/129/console

Reassigning from Areek to @bleskes for now. @bleskes feel free to reassign to someone else as appropriate

@abeyad abeyad assigned bleskes and unassigned areek May 22, 2017
@jasontedor
Copy link
Member

This test is still failing. Can you take a look @bleskes?

Here are logs: logs.zip.

bleskes added a commit that referenced this issue May 24, 2017
The current log tries make sure we waited some (but not too long). This is unpredictable and fails all the time. This commit removes all of it and just make sure that we throw the right exceptions after timing out.

Fixes #24369
bleskes added a commit that referenced this issue Jun 9, 2017
The current log tries make sure we waited some (but not too long). This is unpredictable and fails all the time. This commit removes all of it and just make sure that we throw the right exceptions after timing out.

Fixes #24369
@spinscale
Copy link
Contributor

@bleskes this failed on 5.3 as well - might be worth a backport?

CI link: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.3+multijob-windows-compatibility/72/console

@spinscale spinscale reopened this Jun 22, 2017
@jasontedor
Copy link
Member

jasontedor commented Jun 22, 2017

The 5.3 branch should be set to push only in CI and we should then not worry about backporting fixes for sporadic test failures.

@bleskes bleskes closed this as completed Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests
Projects
None yet
Development

No branches or pull requests

7 participants