test(GODT-1602): run integration tests against black 🖤

This commit is contained in:
Jakub Cuth
2024-02-19 10:43:35 +00:00
parent 2a1aeb208d
commit 37352d44d2
51 changed files with 525 additions and 271 deletions

View File

@ -448,19 +448,19 @@ func eventually(condition func() error) error {
var timerDuration = 30 * time.Second
// Extend to 5min for live API.
if hostURL := os.Getenv("FEATURE_TEST_HOST_URL"); hostURL != "" {
timerDuration = 600 * time.Second
timerDuration = 300 * time.Second
}
timer := time.NewTimer(timerDuration)
defer timer.Stop()
ticker := time.NewTicker(100 * time.Millisecond)
ticker := time.NewTicker(timerDuration / 300)
defer ticker.Stop()
for tick := ticker.C; ; {
select {
case <-timer.C:
return fmt.Errorf("timed out: %w", lastErr)
return fmt.Errorf("eventually timed out: %w", lastErr)
case <-tick:
tick = nil