Skip to content

Conversation

@akrem-chabchoub
Copy link
Contributor

@akrem-chabchoub akrem-chabchoub commented Oct 29, 2025

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

Add synctest in wait test.
Remove parallel execution from tests (synctest).

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

#5232

Screenshots (if appropriate):

Copilot AI review requested due to automatic review settings October 29, 2025 07:26
@akrem-chabchoub akrem-chabchoub marked this pull request as draft October 29, 2025 07:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the spinlock package tests to use Go's testing/synctest package for deterministic time-based testing, and temporarily restricts CI test execution to only the spinlock package.

  • Wraps time-sensitive test cases with synctest.Test() for controlled time simulation
  • Restricts CI test targets (test-ci, test-ci-race) to run only ./pkg/spinlock instead of all packages

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/spinlock/wait_test.go Adds testing/synctest import and wraps test logic in synctest.Test() calls for deterministic time testing
Makefile Restricts test-ci and test-ci-race targets to only run pkg/spinlock tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akrem-chabchoub akrem-chabchoub marked this pull request as ready for review October 29, 2025 08:12
@akrem-chabchoub akrem-chabchoub self-assigned this Oct 29, 2025
@akrem-chabchoub akrem-chabchoub added this to the v2.7.0 milestone Oct 29, 2025
Copy link
Contributor

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert Makefile, otherwise LGTM

@akrem-chabchoub akrem-chabchoub merged commit 54b963a into master Nov 23, 2025
25 of 29 checks passed
@akrem-chabchoub akrem-chabchoub deleted the migrate-to-synctest-part3 branch November 23, 2025 12:01
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.

Use the new testing/synctest package from golang 1.25 in tests

5 participants