Skip to content

Conversation

@La002
Copy link
Contributor

@La002 La002 commented Jan 17, 2026

Testing: use synctest for timing-dependent tests

Converted timing-based tests to use Go 1.25's synctest for instant, deterministic execution with simulated time.

Moved converted tests to *_go125_test.go files. Tests using real I/O (exec.Command, httptest) remain timing-based as they require actual system operations.

Fixes #680

Converted tests with time.After/time.Sleep to use Go 1.25's synctest
package in new *_go125_test.go files for instant, deterministic execution.

Tests using real I/O remain timing-based.

Fixes modelcontextprotocol#680
@La002 La002 changed the title Moved tests using time to use synctest in new files Testing: use synctest for timing-dependent tests Jan 17, 2026
@La002
Copy link
Contributor Author

La002 commented Jan 25, 2026

@findleyr @jba following up, is this still relevant ? Are any changes required?

@La002
Copy link
Contributor Author

La002 commented Jan 28, 2026

@maciej-kisiel Pushed with the changes discussed here

Copy link
Contributor

@maciej-kisiel maciej-kisiel left a comment

Choose a reason for hiding this comment

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

Thank you for the PR and and patience with the review. I added some comments.

@La002
Copy link
Contributor Author

La002 commented Feb 5, 2026

replied to comments @maciej-kisiel

Copy link
Contributor

@maciej-kisiel maciej-kisiel left a comment

Choose a reason for hiding this comment

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

Thank you for the changes. There are still 3 unresolved comment threads, please take a look.

@La002
Copy link
Contributor Author

La002 commented Feb 6, 2026

I replied one comment I had missed earlier. For keepAliveFailure one, please let me know what you think.

Copy link
Contributor

@maciej-kisiel maciej-kisiel left a comment

Choose a reason for hiding this comment

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

Thanks for your patience and contribution!

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.

Testing: use synctest throughout

3 participants