Jens Deppe created GEODE-5346:
---------------------------------
Summary: Fix race in LauncherLifecycleCommandsDUnitTest
Key: GEODE-5346
URL: https://issues.apache.org/jira/browse/GEODE-5346
Project: Geode
Issue Type: Bug
Components: gfsh, management
Reporter: Jens Deppe
Errors such as the following sometimes occur:
{noformat}
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest
> testVersionTitleForStartServerAndLocator FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.readPid(LauncherLifecycleCommandsDUnitTest.java:195)
at
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.waitForGemFireProcessToStop(LauncherLifecycleCommandsDUnitTest.java:260)
at
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.stopServer(LauncherLifecycleCommandsDUnitTest.java:237)
at
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.testVersionTitleForStartServerAndLocator(LauncherLifecycleCommandsDUnitTest.java:449){noformat}
Fix a race where we wait for a component to stop by calling {{stop()}} and then
waiting for the pid to disappear. The stop action happens in a different thread
so the pid may disappear before the checking thread actually gets to check it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)