kyber icon indicating copy to clipboard operation
kyber copied to clipboard

Use synctest instead of fakeclock in tests

Open AnomalRoil opened this issue 2 months ago • 5 comments

This is a newly added feature of Go 1.25: synctest allows to use the time package like one would in real life, and have a special synctest bubble in which tests are run where synchronization of goroutine can be ensured by calling synctest.Wait() after a time.Sleep() has been called, e.g.

It also will warn about deadlock caused by time.Sleep and such in go routines.

AnomalRoil avatar Nov 11 '25 14:11 AnomalRoil

🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.

github-actions[bot] avatar Nov 11 '25 14:11 github-actions[bot]

🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.

github-actions[bot] avatar Nov 11 '25 14:11 github-actions[bot]

This is weird, I would expect it to pickup my new github workflow file that specifies go 1.25 but it seems it keeps using the old values weirdly.

AnomalRoil avatar Nov 11 '25 15:11 AnomalRoil

Yes, it's designed to use the repo's GitHub actions. Can you split this PR into one to update the workflows and the other for dkg/synctest ? It'll be easiest to get this merged. Had a quick look, LGTM 👍

pierluca avatar Nov 21 '25 18:11 pierluca

go 1.25 and golangci-lint setup are already part of the int32-reviewed branch that should be merged to master soon-ish.

jbsv avatar Nov 26 '25 08:11 jbsv