Skip to content

Commit

Permalink
fix race on TestGarbageCollectionNEG
Browse files Browse the repository at this point in the history
  • Loading branch information
aojea committed Oct 18, 2022
1 parent 957a4c3 commit aec3b07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/neg/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ func TestGarbageCollectionNEG(t *testing.T) {
version = meta.VersionAlpha
}
negName := manager.namer.NEG("test", "test", 80)
manager.mu.Lock()
manager.cloud.CreateNetworkEndpointGroup(&composite.NetworkEndpointGroup{
Version: version,
Name: negName,
Expand All @@ -397,6 +398,7 @@ func TestGarbageCollectionNEG(t *testing.T) {
Name: negName,
NetworkEndpointType: string(networkEndpointType),
}, negtypes.TestZone2)
manager.mu.Unlock()

svcNeg := &negv1beta1.ServiceNetworkEndpointGroup{
ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: negName},
Expand Down

0 comments on commit aec3b07

Please sign in to comment.