Skip to content

Commit

Permalink
remove link after metrics test
Browse files Browse the repository at this point in the history
attempt to address race condition in tests that happens in CI
  • Loading branch information
neufeldtech committed Mar 10, 2022
1 parent 629374b commit 2d9a1b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func TestProxyMetricsReceivedSentBytes(t *testing.T) {
w := &testWriteCloser{
bufio.NewWriter(bytes.NewBuffer([]byte{})),
}
proxy.Toxics.StartLink(srv, "testupstream", r, w, stream.Upstream)
linkName := "testupstream"
proxy.Toxics.StartLink(srv, linkName, r, w, stream.Upstream)
proxy.Toxics.RemoveLink(linkName)
gotMetrics := prometheusOutput(t, srv, "toxiproxy")
if !reflect.DeepEqual(gotMetrics, expectedMetrics) {
t.Fatalf("expected: %v got: %v", expectedMetrics, gotMetrics)
Expand Down

0 comments on commit 2d9a1b3

Please sign in to comment.