fix(task): Ensure tasks clean up user resource maps (#14109)

* fix(task): Ensure tasks clean up user resource maps
fixes #14108
pull/14113/head
Lyon Hill 2019-06-11 10:28:09 -06:00 committed by GitHub
parent a181e60d70
commit b7078f5510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,6 @@ import (
)
func TestTaskService(t *testing.T) {
t.Skip("TODO(#14108): flaky test (https://github.com/influxdata/influxdb/issues/14108)")
t.Parallel()
servicetest.TestTaskService(
t,

View File

@ -792,7 +792,10 @@ func (s *Service) deleteTask(ctx context.Context, tx Tx, id influxdb.ID) error {
if err := taskBucket.Delete(key); err != nil {
return ErrUnexpectedTaskBucketErr(err)
}
return nil
return s.deleteUserResourceMapping(ctx, tx, influxdb.UserResourceMappingFilter{
ResourceID: task.ID,
})
}
// FindLogs returns logs for a run.