Use synctest instead of fakeclock in tests#586
Conversation
|
🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer. |
1 similar comment
|
🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer. |
951b0a4 to
279ca8d
Compare
|
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. |
|
Yes, it's designed to use the repo's GitHub actions. |
|
go 1.25 and golangci-lint setup are already part of the int32-reviewed branch that should be merged to master soon-ish. |
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
|
|
Hi @AnomalRoil , is it ok to have a little bit of duplication in test code ? Should we proceed to merge this work within the master branch now ? |
|
@jbsv IMO yes, and I didn't add duplicate code, it's just I touched existing one and so it triggers SonarCloud analysis on it... |


This is a newly added feature of Go 1.25:
synctestallows to use thetimepackage like one would in real life, and have a specialsynctestbubble in which tests are run where synchronization of goroutine can be ensured by callingsynctest.Wait()after atime.Sleep()has been called, e.g.It also will warn about deadlock caused by
time.Sleepand such in go routines.