mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
Waits briefly to ensure logs are flushed
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log/slog"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -61,7 +62,8 @@ func TestDispatchToTaskWorkerFromWorker(t *testing.T) {
|
||||
|
||||
assertGetRequest(t, "http://example.com/testdata/tasks/task-dispatcher.php?count=4", "dispatched 4 tasks")
|
||||
|
||||
// shutdown to ensure all logs are flushed
|
||||
// wait and shutdown to ensure all logs are flushed
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
Shutdown()
|
||||
|
||||
// task output appears in logs at info level
|
||||
|
||||
Reference in New Issue
Block a user