chore: Closing in goroutine causes race with logging framework

pull/19525/head
Stuart Carnie 2020-09-09 06:48:43 -07:00
parent 7c2be6e780
commit ab31e7763b
1 changed files with 11 additions and 13 deletions

View File

@ -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)
}
},
)
}