File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,19 @@ type ServiceRegistryTestSuite struct {
28
28
29
29
func (s * ServiceRegistryTestSuite ) TestGetNotificationCenter () {
30
30
// empty state, make sure we get a new notification center
31
- sdkKey := "sdk_key_1"
32
- notificationCenter := GetNotificationCenter (sdkKey )
31
+ sdkKey1 := "sdk_key_1"
32
+ sdkKey2 := "sdk_key_2"
33
+ notificationCenter := GetNotificationCenter (sdkKey1 )
33
34
s .NotNil (notificationCenter )
34
35
35
- notificationCenter2 := GetNotificationCenter (sdkKey )
36
+ notificationCenter2 := GetNotificationCenter (sdkKey1 )
37
+ s .Equal (notificationCenter , notificationCenter2 )
38
+
39
+ // make sure sdkKey2 does not cause race condition
40
+ notificationCenter = GetNotificationCenter (sdkKey2 )
41
+ s .NotNil (notificationCenter )
42
+
43
+ notificationCenter2 = GetNotificationCenter (sdkKey2 )
36
44
s .Equal (notificationCenter , notificationCenter2 )
37
45
}
38
46
You can’t perform that action at this time.
0 commit comments