mirror of
https://github.com/fleetdm/fleet
synced 2026-05-16 21:48:48 +00:00
Context: https://fleetdm.slack.com/archives/C019WG4GH0A/p1767759920870649 Looks like some of the tests in `nats_test.go` are failing due to timeouts. The timeout used for the context in these tests is 5 seconds. Instead of increasing it, I decided to reduce the number of logs that are written in tests as well as some sleep statements that I don't think are needed. Note that in `nats.go` we use `context.WithTimeout` so that's why the context deadline exceeded error is raised. <img width="747" height="373" alt="Screenshot 2026-01-07 at 9 38 04 AM" src="https://github.com/user-attachments/assets/1a817e8b-6a4a-4d43-9891-07f2791b82ea" /> ## Testing Did 5 test runs and measured the test completion time ### Before <img width="1211" height="230" alt="Screenshot 2026-01-07 at 9 39 59 AM" src="https://github.com/user-attachments/assets/cf22397b-1962-439c-831f-ef9cde6bf590" /> Completion time (avg): 1.23s ### After <img width="922" height="227" alt="Screenshot 2026-01-07 at 9 38 53 AM" src="https://github.com/user-attachments/assets/12e1bddd-a257-4313-ab89-e1339374796c" /> Completion time (avg): 0.31s |
||
|---|---|---|
| .. | ||
| mock | ||
| filesystem.go | ||
| filesystem_test.go | ||
| firehose.go | ||
| firehose_test.go | ||
| kafkarest.go | ||
| kafkarest_test.go | ||
| kinesis.go | ||
| kinesis_test.go | ||
| lambda.go | ||
| lambda_test.go | ||
| logging.go | ||
| nanodep.go | ||
| nats.go | ||
| nats_test.go | ||
| pubsub.go | ||
| stdout.go | ||
| webhook.go | ||
| webhook_test.go | ||