Browse Source

Kill the whole docker acquis in tests (#1475)

blotus 3 years ago
parent
commit
1bd8cc79c8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      pkg/acquisition/modules/docker/docker_test.go

+ 1 - 2
pkg/acquisition/modules/docker/docker_test.go

@@ -183,7 +183,7 @@ container_name_regexp:
 					ticker.Reset(1 * time.Second)
 					ticker.Reset(1 * time.Second)
 				case <-ticker.C:
 				case <-ticker.C:
 					log.Infof("no more line to read")
 					log.Infof("no more line to read")
-					streamTomb.Kill(nil)
+					dockerSource.t.Kill(nil)
 					return nil
 					return nil
 				}
 				}
 			}
 			}
@@ -198,7 +198,6 @@ container_name_regexp:
 		if ts.expectedLines != 0 {
 		if ts.expectedLines != 0 {
 			assert.Equal(t, ts.expectedLines, actualLines)
 			assert.Equal(t, ts.expectedLines, actualLines)
 		}
 		}
-		dockerSource.t.Kill(nil)
 		err = streamTomb.Wait()
 		err = streamTomb.Wait()
 		if err != nil {
 		if err != nil {
 			t.Fatalf("docker acquisition error: %s", err)
 			t.Fatalf("docker acquisition error: %s", err)