chore: Closing in goroutine causes race with logging framework
parent
7c2be6e780
commit
ab31e7763b
|
@ -66,24 +66,22 @@ func TestAnalyticalStore(t *testing.T) {
|
|||
|
||||
ts.BucketService = storage.NewBucketService(ts.BucketService, ab.storageEngine)
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
ab.Close(t)
|
||||
}()
|
||||
|
||||
authCtx := icontext.SetAuthorizer(ctx, &influxdb.Authorization{
|
||||
Permissions: influxdb.OperPermissions(),
|
||||
})
|
||||
|
||||
return &servicetest.System{
|
||||
TaskControlService: svcStack,
|
||||
TaskService: svcStack,
|
||||
OrganizationService: ts.OrganizationService,
|
||||
UserService: ts.UserService,
|
||||
UserResourceMappingService: ts.UserResourceMappingService,
|
||||
AuthorizationService: authSvc,
|
||||
Ctx: authCtx,
|
||||
}, cancelFunc
|
||||
TaskControlService: svcStack,
|
||||
TaskService: svcStack,
|
||||
OrganizationService: ts.OrganizationService,
|
||||
UserService: ts.UserService,
|
||||
UserResourceMappingService: ts.UserResourceMappingService,
|
||||
AuthorizationService: authSvc,
|
||||
Ctx: authCtx,
|
||||
}, func() {
|
||||
cancelFunc()
|
||||
ab.Close(t)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue