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 pullsync.
Remove parallel execution from tests (synctest).

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

#5232

Screenshots (if appropriate):

@akrem-chabchoub akrem-chabchoub marked this pull request as ready for review October 29, 2025 08:12
Copilot AI review requested due to automatic review settings October 29, 2025 08:12
@akrem-chabchoub akrem-chabchoub self-assigned this Oct 29, 2025
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 migrates pullsync tests to use Go 1.25's new testing/synctest package, replacing t.Parallel() calls with synctest.Test() wrappers. This allows for deterministic testing of concurrent code by controlling goroutine scheduling. The Makefile is also temporarily modified to run only pullsync tests during CI.

  • Wrapped 9 test functions with synctest.Test() to enable deterministic concurrent testing
  • Removed t.Parallel() calls that are incompatible with synctest
  • Temporarily restricted CI test scope to ./pkg/pullsync for validation

Reviewed Changes

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

File Description
pkg/pullsync/pullsync_test.go Wrapped test functions with synctest.Test() and removed t.Parallel() calls to enable deterministic concurrent testing
Makefile Temporarily restricted test-ci and test-ci-race targets to only run pullsync tests instead of all tests

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

Makefile Outdated
Comment on lines 124 to 126
$(GO) test -run "[^FLAKY]$$" -coverprofile=cover.out ./pkg/pullsync
else
$(GO) test -run "[^FLAKY]$$" ./...
$(GO) test -run "[^FLAKY]$$" ./pkg/pullsync
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The Makefile changes restrict CI testing to only ./pkg/pullsync instead of ./.... This appears to be a temporary change for testing purposes but should not be merged to production. If this is intentional for this PR, it should be reverted in a follow-up commit or before merging to ensure all package tests continue to run in CI.

Copilot uses AI. Check for mistakes.
Makefile Outdated
Comment on lines 132 to 134
$(GO) test -race -run "[^FLAKY]$$" -coverprofile=cover.out ./pkg/pullsync
else
$(GO) test -race -run "[^FLAKY]$$" ./...
$(GO) test -race -run "[^FLAKY]$$" ./pkg/pullsync
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The Makefile changes restrict CI testing to only ./pkg/pullsync instead of ./.... This appears to be a temporary change for testing purposes but should not be merged to production. If this is intentional for this PR, it should be reverted in a follow-up commit or before merging to ensure all package tests continue to run in CI.

Copilot uses AI. Check for mistakes.
@akrem-chabchoub akrem-chabchoub added this to the v2.7.0 milestone Oct 29, 2025
@akrem-chabchoub akrem-chabchoub merged commit aed9d55 into master Dec 1, 2025
15 checks passed
@akrem-chabchoub akrem-chabchoub deleted the migrate-to-synctest-pullsync branch December 1, 2025 18:53
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

4 participants