Benjamin Peinhardt
02fc173df4
fix: fix flake due to two time.Now() calls ( #19450 )
...
fixes https://github.com/coder/internal/issues/559
This test is looking to see that after calling `coder schedule extend
<workspace> 10h`, the scheduled stop time of the workspace is updated
appropriately (or at least that the information printed to the terminal
indicates that).
By using two `time.Now()` calls for the current time and the expected
time, there was the possibility that the second call just barely crossed
over the hour mark. This is shown in the error message when the test
would flake: `wanted "2025-04-07T22:"; got " 2025-04-07T23:00:00+05:30
\r\n"` (the 00:00 letting us know we just barely crossed the hour).
Using the same time object to construct the expected time should fix the
issue.
2025-08-20 12:12:02 -05:00
..
2025-01-29 14:35:04 +00:00
2025-06-20 13:16:55 -06:00
2025-08-07 11:37:58 +00:00
2025-06-24 11:16:31 +02:00
2024-02-26 10:03:49 -06:00
2025-01-17 14:51:24 +02:00
2025-06-20 13:16:55 -06:00
2023-09-04 21:42:45 +03:00
2025-08-19 10:41:33 +02:00
2025-06-20 13:16:55 -06:00
2025-08-04 13:22:04 +04:00
2025-08-04 16:21:13 +01:00
2025-06-20 13:16:55 -06:00
2024-03-17 09:45:26 -05:00
2024-08-22 15:40:53 +10:00
2025-06-20 13:16:55 -06: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
2025-07-03 11:28:00 -06:00
2025-04-17 11:23:24 +04:00
2025-04-17 11:23:24 +04:00
2025-07-29 16:59:26 +01:00
2025-08-19 10:52:31 +02:00
2025-08-20 23:38:09 +10:00
2024-12-05 12:32:52 +11: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
2025-03-04 15:37:29 -07:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2025-06-30 12:12:20 -08:00
2025-07-22 13:56:20 +02:00
2025-08-06 23:03:51 +02:00
2025-07-22 19:02:43 +01:00
2025-08-19 10:52:31 +02:00
2024-03-17 09:45:26 -05:00
2025-01-03 23:08:51 +02:00
2025-05-29 13:12:13 -03:00
2025-03-31 18:52:09 +01:00
2025-03-26 01:56:39 -05:00
2025-06-13 12:53:43 -08:00
2024-10-22 09:20:54 -05:00
2024-03-17 09:45:26 -05:00
2025-03-26 01:56:39 -05:00
2025-06-13 12:53:43 -08:00
2024-10-22 09:20:54 -05:00
2025-06-13 12:53:43 -08:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2025-02-13 10:13:20 -05:00
2025-08-19 10:52:31 +02:00
2024-10-29 13:02:20 +00:00
2025-03-26 01:56:39 -05:00
2025-05-12 11:45:24 -07:00
2025-01-29 18:06:22 +02:00
2024-06-13 10:19:36 +04:00
2024-06-13 10:19:36 +04:00
2025-06-20 13:16:55 -06:00
2025-02-19 13:08:38 +00:00
2025-06-20 13:16:55 -06:00
2025-07-22 19:02:43 +01:00
2025-08-19 10:52:31 +02:00
2024-07-25 16:07:53 -05:00
2024-09-17 14:08:33 -05:00
2025-03-17 17:14:59 -04:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-05-23 07:54:59 -10:00
2025-06-26 12:28:00 -06:00
2025-06-26 12:28:00 -06:00
2023-08-09 13:00:25 +02:00
2025-07-28 14:46:04 +01:00
2025-07-28 14:46:04 +01:00
2025-07-03 13:22:54 +10:00
2025-02-24 05:38:17 +00:00
2025-08-20 10:00:44 +01:00
2025-06-20 13:16:55 -06:00
2025-06-27 14:42:22 +04:00
2025-08-20 10:00:44 +01:00
2025-06-20 13:16:55 -06:00
2025-07-08 11:02:58 +02:00
2025-08-20 23:38:09 +10:00
2025-03-10 12:28:06 +00:00
2023-08-18 18:55:43 +00:00
2025-01-29 18:06:22 +02:00
2025-03-26 01:56:39 -05:00
2024-07-30 10:44:02 -06:00
2024-09-18 21:47:53 +10:00
2024-03-17 09:45:26 -05:00
2024-11-04 17:23:31 +01:00
2025-03-26 01:56:39 -05:00
2025-07-28 20:41:49 -05:00
2025-07-28 20:41:49 -05:00
2025-06-20 13:16:55 -06:00
2025-04-17 11:23:24 +04:00
2025-08-19 10:52:31 +02:00
2025-06-20 13:16:55 -06:00
2025-08-20 12:12:02 -05:00
2025-08-19 10:52:31 +02:00
2024-11-04 17:23:31 +01:00
2025-01-20 14:31:16 +01:00
2025-06-20 13:16:55 -06:00
2025-03-27 10:03:53 +00:00
2025-03-27 10:03:53 +00:00
2024-03-17 09:45:26 -05:00
2025-07-09 09:46:31 +02:00
2025-08-07 11:21:17 -05:00
2025-07-08 16:16:00 +00:00
2025-07-08 16:16:00 +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
2025-08-20 10:00:44 +01:00
2025-07-08 19:21:41 +03:00
2023-07-20 12:05:39 +02:00
2025-07-22 19:02:43 +01:00
2023-07-20 12:05:39 +02:00
2025-08-20 10:00:44 +01:00
2025-07-28 20:41:49 -05:00
2025-07-22 13:11:27 +02:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2024-10-22 09:20:54 -05:00
2024-03-17 09:45:26 -05:00
2025-06-23 09:12:37 +01:00
2025-06-24 11:16:31 +02:00
2025-06-24 11:16:31 +02:00
2024-07-25 16:07:53 -05:00
2024-11-01 19:43:51 +00:00
2023-10-10 11:14:20 +01:00
2024-07-01 16:04:45 -05:00
2025-06-20 13:16:55 -06:00
2025-08-12 11:37:44 -05: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
2024-07-09 11:04:16 -05:00
2025-07-29 16:59:26 +01:00
2025-07-29 16:59:26 +01:00
2025-06-20 13:16:55 -06:00
2024-07-01 16:04:45 -05:00
2025-07-28 20:41:49 -05:00
2025-06-03 16:55:34 +01:00
2025-07-24 16:44:36 +01:00
2023-10-11 09:26:22 -05:00
2025-01-29 18:06:22 +02:00
2024-10-17 14:15:14 +05:00
2024-10-17 14:15:14 +05:00
2025-02-12 18:18:17 +11:00
2025-03-04 00:46:49 +11:00
2025-07-28 20:41:49 -05:00
2025-06-23 09:12:37 +01:00
2024-08-23 21:23:51 +00:00
2025-04-16 10:37:09 -06:00
2025-05-13 20:48:16 +00:00
2024-03-17 09:45:26 -05:00
2025-04-15 18:30:20 -04:00
2025-05-22 19:48:23 +10:00
2025-05-12 11:45:24 -07:00
2025-05-13 20:48:16 +00:00
2025-04-15 18:30:20 -04:00
2023-10-10 11:14:20 +01:00
2024-08-20 14:47:46 +10: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
2024-03-17 09:45:26 -05:00
2025-07-30 02:03:20 +10:00
2025-07-30 02:03:20 +10:00
2025-06-20 13:16:55 -06:00
2025-07-28 14:02:00 +10:00
2024-11-18 21:10:01 +10:00
2024-11-18 14:09:22 +04:00
2025-08-19 10:52:31 +02:00
2024-07-09 13:23:11 -05:00
2024-07-09 13:23:11 -05:00