satellite/payments/accountfreeze: fix race in test
This change fixes data races in tests for the account freeze chore caused by the chore service being set while in use. Change-Id: Ibcb94a947c405314deae0d77419e69b768feab40
This commit is contained in:
parent
ab57cd30b0
commit
0c1306780e
@ -42,6 +42,8 @@ func TestAutoFreezeChore(t *testing.T) {
|
||||
projectsDB := sat.DB.Console().Projects()
|
||||
service := console.NewAccountFreezeService(sat.DB.Console().AccountFreezeEvents(), usersDB, projectsDB, newFreezeTrackerMock(t))
|
||||
chore := sat.Core.Payments.AccountFreeze
|
||||
|
||||
chore.Loop.Pause()
|
||||
chore.TestSetFreezeService(service)
|
||||
|
||||
user, err := sat.AddUser(ctx, console.CreateUser{
|
||||
@ -455,6 +457,8 @@ func TestAutoFreezeChore_StorjscanExclusion(t *testing.T) {
|
||||
projectsDB := sat.DB.Console().Projects()
|
||||
service := console.NewAccountFreezeService(sat.DB.Console().AccountFreezeEvents(), usersDB, projectsDB, newFreezeTrackerMock(t))
|
||||
chore := sat.Core.Payments.AccountFreeze
|
||||
|
||||
chore.Loop.Pause()
|
||||
chore.TestSetFreezeService(service)
|
||||
|
||||
amount := int64(100)
|
||||
|
Loading…
Reference in New Issue
Block a user