Skip to content

Commit

Permalink
fix OSGiCommands test
Browse files Browse the repository at this point in the history
  • Loading branch information
mz1999 committed Jun 5, 2023
1 parent e6610fe commit c71aa31
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.glassfish.main.itest.tools.asadmin.AsadminResult;
import org.glassfish.main.itest.tools.asadmin.AsadminResultMatcher;
import org.hamcrest.collection.IsEmptyCollection;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.glassfish.main.itest.tools.asadmin.AsadminResultMatcher.asadminOK;
Expand All @@ -48,6 +49,17 @@ public class OSGiCommandsITest {

private static final Asadmin ASADMIN = GlassFishTestEnvironment.getAsadmin();

@BeforeAll
public static void waitOsgiReady() throws Exception {
for (int i = 0; i < 5; i++) {
AsadminResult result = ASADMIN.exec("osgi", "lb");
if (!result.isError()) {
return;
}
Thread.sleep(1000);
}
}

@Test
public void basicOsgiCmd() {
assertThat(ASADMIN.exec("osgi", "lb"), asadminOK());
Expand Down

0 comments on commit c71aa31

Please sign in to comment.