[ 
https://issues.apache.org/jira/browse/GEODE-6297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16746861#comment-16746861
 ] 

Kirk Lund edited comment on GEODE-6297 at 1/19/19 12:44 AM:
------------------------------------------------------------

The cause of this failure is that Awaitility.untilAsserted will fail 
immediately if anything but an AssertionError is thrown.

There is a window of time in which launcher.status().getStatus() may throw 
IllegalStateException and the await needs to wait for that as well as the 
assertion.

Changing the method to catch RuntimeException and wrap it inside AssertionError 
should fix this problem:
{noformat}
    await().untilAsserted(() -> {
      try {
        assertThat(launcher.status().getStatus()).isEqualTo(Status.ONLINE);
      } catch (Exception e) {
        throw new AssertionError(e);
      }
    });
{noformat}

I suspect there may be additional Launcher tests that require this fix.


was (Author: klund):
The cause of this failure is that Awaitility.untilAsserted will fail 
immediately if anything but an AssertionError is thrown.

There is a window of time in which launcher.status().getStatus() may throw 
IllegalStateException and the await needs to wait for that as well as the 
assertion.

Changing the method to catch RuntimeException and wrap it inside AssertionError 
should fix this problem:
{noformat}   
    await().untilAsserted(() -> {
      try {
        assertThat(launcher.status().getStatus()).isEqualTo(Status.ONLINE);
      } catch (RuntimeException e) {
        throw new AssertionError(e);
      }
    });
{noformat}

I suspect there may be additional Launcher tests that require this fix.

> CI failure: 
> LocatorLauncherRemoteFileIntegrationTest.statusWithPidReturnsOnlineWithDetails
> ------------------------------------------------------------------------------------------
>
>                 Key: GEODE-6297
>                 URL: https://issues.apache.org/jira/browse/GEODE-6297
>             Project: Geode
>          Issue Type: Bug
>          Components: management
>            Reporter: Bruce Schuchardt
>            Assignee: Kirk Lund
>            Priority: Major
>              Labels: CI
>
> Failed in Windows CI run 
> [232|https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/WindowsIntegrationTestOpenJDK8/builds/232]
> {noformat}
> > Task :geode-core:integrationTest
> org.apache.geode.distributed.LocatorLauncherRemoteFileIntegrationTest > 
> statusWithPidReturnsOnlineWithDetails FAILED
>     java.lang.IllegalStateException: Status file 
> 'C:\Users\geode\AppData\Local\Temp\junit7623641902150852427\vf.gf.locator.status'
>  is blank
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to