#1601·ginkgo

Synctest support

Author: wuzufCreated Oct 3, 2025Updated May 9, 2026

Dear team,

Anyone looking at adding synctest support in Ginkgo?

It is really bringing a lot of value when testing asynchronous behaviors and I was wondering if it could be integrated directly in Ginkgo.

I managed to use it in my current test suites, here are the difficulties I faced:

  • Access to the *testing.T (needed to call synctest.Test). For now I am storing that in a package variable at the beginning of my test suite function.
  • All the BeforeEach are run outside if the "bubble", and it creates problems if they start goroutines or create channels. My workaround is to not relly on BeforeEach(func() {...}) and instead replace it with beforeEach = func() {...} and call the function inside the synctest.Test callback.

I did not check Ginkgo code in details, but I guess it would require another kind of It (or Describe) that starts the bubble before calling the BeforeEach...

I am raising this issue to poll for interest, I can also help on the coding part if needed. For now, my workarounds work for me, it makes just test cases a bit more convoluted when using synctest.

Thanks a lot for the feedback :)