Mathias Fredriksson
33136dfe39
fix: use signal-based sync instead of time.Sleep in sync test ( #22918 )
...
The `start_with_dependencies` golden test was flaky on Windows CI. It
used `time.Sleep(100ms)` in a goroutine hoping the `sync start` command
would have time to call `SyncReady`, find the dependency unsatisfied,
and print the "Waiting..." message before the goroutine completed the
dependency.
On slower Windows runners, the sleep could finish and complete the
dependency before the command's first `SyncReady` call, so `ready` was
already `true` and the "Waiting..." message was never printed, causing
the golden file mismatch.
This replaces the `time.Sleep` with a `syncWriter` that wraps
`bytes.Buffer` with a mutex and a channel. The channel closes when the
written output contains the expected signal string ("Waiting"). The
goroutine blocks on this channel instead of sleeping, so it only
completes the dependency after the command has confirmed it is in the
waiting state.
Fixes https://github.com/coder/internal/issues/1376
2026-03-10 17:21:08 +00:00
..
2026-01-08 15:24:11 +04:00
2026-02-02 15:50:09 +02:00
2026-03-05 09:35:57 -08:00
2025-06-24 11:16:31 +02:00
2024-02-26 10:03:49 -06:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-12-15 09:40:59 -07:00
2023-09-04 21:42:45 +03:00
2026-03-07 01:36:03 +00:00
2025-06-20 13:16:55 -06:00
2026-03-03 21:23:59 +04:00
2026-03-03 21:23:59 +04:00
2025-10-27 17:07:25 +01:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2024-08-22 15:40:53 +10:00
2025-09-29 17:01:54 +04:00
2025-06-06 16:44:25 +04:00
2025-07-03 11:28:00 -06:00
2025-06-06 16:44:25 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-03 14:10:49 -06:00
2026-02-03 14:10:49 -06:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2026-03-04 21:41:21 +04:00
2026-03-04 21:41:21 +04:00
2026-03-05 09:35:57 -08:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2026-02-02 16:16:16 +02:00
2026-01-08 15:24:11 +04:00
2026-03-10 12:08:40 +02:00
2026-01-08 15:24:11 +04:00
2026-02-25 11:16:20 -06:00
2024-03-17 09:45:26 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-03 14:10:49 -06:00
2025-03-26 01:56:39 -05:00
2025-09-03 10:49:19 +04:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-09-03 10:38:42 +04:00
2026-03-02 22:52:39 -05:00
2026-03-10 12:12:15 +02:00
2025-09-03 10:49:19 +04:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2025-12-15 09:40:59 -07:00
2026-02-23 08:30:32 -08:00
2025-12-03 11:32:59 +02:00
2026-03-10 15:40:54 +02:00
2026-03-10 15:40:54 +02:00
2025-05-12 11:45:24 -07:00
2025-10-30 17:41:08 -06:00
2026-01-08 15:24:11 +04:00
2026-02-03 09:45:23 +00:00
2024-06-13 10:19:36 +04:00
2025-09-22 17:14:07 +04:00
2025-09-11 15:08:57 +02:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-12-22 11:28:31 +00:00
2026-01-07 16:06:00 +00:00
2026-02-06 14:09:39 +11:00
2026-02-06 14:09:39 +11:00
2026-02-05 19:35:20 +11:00
2026-02-06 14:09:39 +11:00
2025-09-22 17:14:07 +04:00
2024-08-20 14:47:46 +10:00
2025-12-03 11:32:59 +02:00
2024-05-23 07:54:59 -10:00
2025-12-22 11:24:00 +11:00
2026-03-04 11:14:52 -07:00
2023-08-09 13:00:25 +02:00
2025-07-28 14:46:04 +01:00
2026-02-26 14:34:30 +01:00
2026-02-26 14:34:30 +01:00
2025-07-03 13:22:54 +10:00
2025-02-24 05:38:17 +00:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-06-27 14:42:22 +04:00
2026-01-08 15:24:11 +04:00
2025-10-06 08:56:43 +00:00
2025-12-03 11:32:59 +02:00
2026-03-03 08:47:34 +00:00
2025-12-03 11:32:59 +02:00
2023-08-18 18:55:43 +00:00
2026-01-08 15:24:11 +04:00
2025-03-26 01:56:39 -05:00
2024-07-30 10:44:02 -06:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2024-11-04 17:23:31 +01:00
2026-01-08 15:24:11 +04:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2025-06-20 13:16:55 -06:00
2026-01-12 17:46:05 +00:00
2026-03-10 08:57:27 +01:00
2025-06-20 13:16:55 -06:00
2025-10-24 10:18:19 +00:00
2025-12-03 11:32:59 +02:00
2024-11-04 17:23:31 +01:00
2026-01-08 15:24:11 +04:00
2026-03-04 20:26:03 -05:00
2025-10-23 14:24:54 +02:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2026-02-27 16:50:56 +00:00
2026-03-04 20:26:03 -05:00
2026-02-23 08:30:32 -08:00
2026-01-08 15:24:11 +04:00
2026-01-16 15:45:33 +00:00
2026-01-16 15:45:33 +00:00
2024-03-15 13:16:36 +00:00
2024-03-15 13:16:36 +00:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2026-02-09 09:56:33 +00:00
2023-07-20 12:05:39 +02:00
2026-02-09 09:56:33 +00:00
2023-07-20 12:05:39 +02:00
2026-03-10 12:08:40 +02:00
2026-01-30 13:24:06 +11:00
2026-02-24 19:51:48 -05:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2026-02-23 22:46:17 -06:00
2026-01-12 15:16:59 +01:00
2025-09-22 17:14:07 +04:00
2026-01-20 10:28:52 +11:00
2026-01-20 10:28:52 +11:00
2025-11-28 08:33:50 +02:00
2025-11-28 08:33:50 +02:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-03-10 17:21:08 +00:00
2026-01-08 15:24:11 +04:00
2025-11-28 08:33:50 +02:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-12-03 11:32:59 +02:00
2026-03-07 01:36:03 +00:00
2026-02-02 15:50:09 +02:00
2026-03-07 01:36:03 +00:00
2026-02-13 14:21:31 +00:00
2026-03-07 01:36:03 +00:00
2026-02-17 16:24:13 +00:00
2026-03-07 01:36:03 +00:00
2026-03-07 01:36:03 +00:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-03-07 01:36:03 +00:00
2026-02-17 16:24:13 +00:00
2024-07-25 16:07:53 -05:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2023-08-18 18:55:43 +00:00
2024-03-17 09:45:26 -05:00
2024-07-25 16:07:53 -05:00
2025-12-03 11:32:59 +02:00
2025-12-15 11:26:41 -06:00
2025-12-03 11:32:59 +02:00
2025-06-20 13:16:55 -06:00
2025-09-22 17:14:07 +04:00
2025-12-15 11:26:41 -06:00
2025-10-03 10:20:06 -05:00
2025-07-24 16:44:36 +01:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2026-02-19 09:31:12 +11:00
2026-02-19 09:31:12 +11:00
2026-03-06 00:04:09 +00:00
2026-02-24 15:27:03 +00:00
2026-02-24 09:15:02 +01:00
2025-09-22 17:14:07 +04:00
2024-08-23 21:23:51 +00:00
2025-04-16 10:37:09 -06:00
2026-01-08 15:24:11 +04:00
2025-09-22 17:14:07 +04:00
2025-04-15 18:30:20 -04:00
2025-09-22 17:14:07 +04:00
2025-05-12 11:45:24 -07:00
2025-12-03 11:32:59 +02:00
2025-04-15 18:30:20 -04:00
2023-10-10 11:14:20 +01:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2024-11-18 21:10:01 +10:00
2024-11-18 14:09:22 +04:00
2026-01-08 15:24:11 +04:00
2024-07-09 13:23:11 -05:00
2025-09-26 11:20:25 +01:00