@@ -36,15 +36,12 @@ import (
3636)
3737
3838func TestServerStress (t * testing.T ) {
39- t .Run ("Header" , func (t * testing.T ) {
40- runStressTest (t , thrift .TransportIDHeader )
39+ t .Run ("UpgradeToRocket" , func (t * testing.T ) {
40+ runStressTest (t , thrift .TransportIDUpgradeToRocket )
41+ })
42+ t .Run ("Rocket" , func (t * testing.T ) {
43+ runStressTest (t , thrift .TransportIDRocket )
4144 })
42- // t.Run("UpgradeToRocket", func(t *testing.T) {
43- // runStressTest(t, thrift.TransportIDUpgradeToRocket)
44- // })
45- // t.Run("Rocket", func(t *testing.T) {
46- // runStressTest(t, thrift.TransportIDRocket)
47- // })
4845}
4946
5047func runStressTest (t * testing.T , serverTransport thrift.TransportID ) {
@@ -159,6 +156,9 @@ func runStressTest(t *testing.T, serverTransport thrift.TransportID) {
159156 err = serverEG .Wait ()
160157 require .ErrorIs (t , err , context .Canceled )
161158
159+ // A tiny sleep to allow for some lingering goroutines to finish up.
160+ time .Sleep (10 * time .Millisecond )
161+
162162 // Go routine check (after server shutdown)
163163 // We shouldn't exceed 10 Go-routines, if we do - something didn't get cleaned up properly.
164164 goroutinesAfterServerStop := runtime .NumGoroutine ()
0 commit comments