Skip to content

Commit 6ab3ee9

Browse files
committed
Fix timing issue in very_long_log_message test
Move FlushAll() call to occur immediately after logging to ensure proper synchronization, and increase wait time from 5ms to 50ms to accommodate slower CI environments (looking at you GHA 🤪).
1 parent 3a9b827 commit 6ab3ee9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/omni/boundary_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,14 @@ func TestBoundaryConditions(t *testing.T) {
181181
longMessage := strings.Repeat("A", 1024*1024)
182182
logger.Info(longMessage)
183183

184-
// Give message time to reach the dispatcher
185-
time.Sleep(5 * time.Millisecond)
186-
184+
// Ensure message is fully processed by flushing
187185
if err := logger.FlushAll(); err != nil {
188186
t.Errorf("FlushAll failed: %v", err)
189187
}
190188

189+
// Give additional time for any background processing on slower systems
190+
time.Sleep(50 * time.Millisecond)
191+
191192
// Should handle large messages
192193
content, err := os.ReadFile(logFile)
193194
if err != nil {

0 commit comments

Comments
 (0)