Skip to content

Commit 942800f

Browse files
echistyakovfacebook-github-bot
authored andcommitted
Switch test to UpgradeToRocket
Summary: Upstream diffs allows us to enable Thrift stress test for UpgradeToRocket/Rocket protocols (finally!). Reviewed By: siutsin Differential Revision: D83116964 fbshipit-source-id: cb87b29985cbd4c37a3a331e1426130542a34401
1 parent 84582bd commit 942800f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

thrift/lib/go/thrift/stress/server_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,12 @@ import (
3636
)
3737

3838
func 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

5047
func 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

Comments
 (0)