Skip to content

Conversation

@gacevicljubisa
Copy link
Member

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Wait for interval persistence using spinlock.Wait() instead of fixed sleep. This fixes the flaky 'storage: not found' error in TestSyncIntervals/0,50-_2_calls by polling for the interval to appear in storage rather than checking immediately after sync operations complete.

The test was failing because checkIntervals() was checking for persisted intervals immediately after sync calls completed, but interval persistence happens asynchronously. Using spinlock.Wait() makes the test more deterministic and handles timing variations better than a fixed time.Sleep().

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

Wait for interval persistence using spinlock.Wait() instead of fixed sleep.
This fixes the flaky 'storage: not found' error in TestSyncIntervals/0,_50_-_2_calls
by polling for the interval to appear in storage rather than checking immediately
after sync operations complete.

The test was failing because checkIntervals() was checking for persisted intervals
immediately after sync calls completed, but interval persistence happens
asynchronously. Using spinlock.Wait() makes the test more deterministic and
handles timing variations better than a fixed time.Sleep().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants