Fix: test flaky sleep and wait patterns
[lttng-tools.git] / tests / regression / ust / java-jul / test_java_jul
index bcde273be7cd8fd066aec60ebbfa307470e44164..359fe0536bb0a059fa45142c5a91081ab71722eb 100755 (executable)
@@ -99,7 +99,7 @@ function test_jul_before_start ()
        start_lttng_tracing $SESSION_NAME
 
        # Wait for the applications started in background
-       wait ${!}
+       wait
 
        stop_lttng_tracing $SESSION_NAME
        destroy_lttng_session $SESSION_NAME
@@ -399,7 +399,8 @@ function test_jul_destroy_session()
        # Run 5 times with a 1 second delay
        run_app_background 0 1
 
-       sleep 1
+       # Wait for the applications started in background
+       wait
 
        stop_lttng_tracing $SESSION_NAME
        destroy_lttng_session $SESSION_NAME
@@ -414,8 +415,11 @@ function test_jul_destroy_session()
        enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2
        start_lttng_tracing $SESSION_NAME
 
+       # Run 5 times with a 1 second delay
+       run_app_background 0 1
+
        # Wait for the applications started in background
-       wait ${!}
+       wait
 
        stop_lttng_tracing $SESSION_NAME
        destroy_lttng_session $SESSION_NAME
This page took 0.023318 seconds and 4 git commands to generate.