Skip to content

[8.18](backport #43858) Increase time until close for unifiedlogs test #43983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 8.18
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions x-pack/filebeat/input/unifiedlogs/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
{
name: "Default stream",
cfg: config{},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogStreamCmd: "/usr/bin/log stream --style ndjson",
assertFunc: func(collect *assert.CollectT, events []beat.Event, cursors []*time.Time) {
require.NotEmpty(collect, events)
Expand All @@ -89,7 +89,7 @@
ArchiveFile: "notfound.logarchive",
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: "/usr/bin/log show --style ndjson --archive notfound.logarchive",
expectedRunErrorMsg: "\"/usr/bin/log show --style ndjson --archive notfound.logarchive\" exited with an error: exit status 64",
},
Expand All @@ -100,7 +100,7 @@
ArchiveFile: archivePath,
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s", archivePath),
assertFunc: eventsAndCursorAssertN(462),
},
Expand All @@ -111,7 +111,7 @@
TraceFile: path.Join(archivePath, "logdata.LiveData.tracev3"),
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --file %s", path.Join(archivePath, "logdata.LiveData.tracev3")),
assertFunc: eventsAndCursorAssertN(7),
},
Expand All @@ -123,7 +123,7 @@
Start: "2024-12-04 13:46:00+0200",
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --start 2024-12-04 13:46:00+0200", archivePath),
assertFunc: eventsAndCursorAssertN(314),
},
Expand All @@ -136,7 +136,7 @@
End: "2024-12-04 13:46:00+0200",
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --start 2024-12-04 13:45:00+0200 --end 2024-12-04 13:46:00+0200", archivePath),
assertFunc: eventsAndCursorAssertN(149),
},
Expand All @@ -161,7 +161,7 @@
End: "2024-12-04 13:46:00+0200",
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --end 2024-12-04 13:46:00+0200", archivePath),
assertFunc: eventsAndCursorAssertN(149),
},
Expand All @@ -177,7 +177,7 @@
},
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --predicate processImagePath == \"/kernel\"", archivePath),
assertFunc: eventsAndCursorAssertN(460),
},
Expand All @@ -193,7 +193,7 @@
},
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --process 0", archivePath),
assertFunc: eventsAndCursorAssertN(462),
},
Expand All @@ -211,7 +211,7 @@
MachContinuousTime: true,
},
},
timeUntilClose: time.Second,
timeUntilClose: 5 * time.Second,
expectedLogShowCmd: fmt.Sprintf("/usr/bin/log show --style ndjson --archive %s --info --debug --backtrace --signpost --mach-continuous-time", archivePath),
assertFunc: eventsAndCursorAssertN(462),
},
Expand Down Expand Up @@ -288,7 +288,7 @@
expectedLogStreamCmd := "/usr/bin/log stream --style ndjson --info --debug --backtrace --signpost --mach-continuous-time"

_, cursorInput := newCursorInput(cfg)
input := cursorInput.(*input)

Check failure on line 291 in x-pack/filebeat/input/unifiedlogs/input_test.go

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

Error return value is not checked (errcheck)

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
Expand Down
Loading