Skip to content

Commit

Permalink
Fix race in test (#3089)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Jun 6, 2024
1 parent 7d3415c commit f1a9d2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vms/platformvm/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,10 +1085,13 @@ func TestServiceGetSubnets(t *testing.T) {
newOwnerIDStr := "P-testing1t73fa4p4dypa4s3kgufuvr6hmprjclw66mgqgm"
newOwnerID, err := service.addrManager.ParseLocalAddress(newOwnerIDStr)
require.NoError(err)

service.vm.ctx.Lock.Lock()
service.vm.state.SetSubnetOwner(testSubnet1ID, &secp256k1fx.OutputOwners{
Addrs: []ids.ShortID{newOwnerID},
Threshold: 1,
})
service.vm.ctx.Lock.Unlock()

require.NoError(service.GetSubnets(nil, &GetSubnetsArgs{}, &response))
require.Equal([]APISubnet{
Expand Down

0 comments on commit f1a9d2a

Please sign in to comment.