diff options
author | Ting-Yu Wang <anivia@google.com> | 2020-12-29 20:22:24 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-29 20:24:40 -0800 |
commit | fc153750ed8b59e9fede94d17102346992396ecb (patch) | |
tree | 5bd97a7a6e04886cad365b05f34500637c4fe32b /test | |
parent | ffa9a715aaf4ebc4c8d8bef948649af358e4f4e4 (diff) |
Deflake TestBindOverlay in //test/e2e:integration_test
Test failure happens when `echo` writes late:
* Server nc shuts down write when it sees EOF from stdin.
* Client nc closes the connection when it detects EOF from socket and no data
in internal write buffer.
Using `-q` flag to make server not shutting down write in the beginning, while
letting connection to be closed by client. As `-q` flag's default value varies
in different netcat versions, we always specify it to prevent future breakage.
PiperOrigin-RevId: 349504016
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/regression_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/e2e/regression_test.go b/test/e2e/regression_test.go index 70bbe5121..84564cdaa 100644 --- a/test/e2e/regression_test.go +++ b/test/e2e/regression_test.go @@ -35,7 +35,7 @@ func TestBindOverlay(t *testing.T) { // Run the container. got, err := d.Run(ctx, dockerutil.RunOpts{ Image: "basic/ubuntu", - }, "bash", "-c", "nc -l -U /var/run/sock & p=$! && sleep 1 && echo foobar-asdf | nc -U /var/run/sock && wait $p") + }, "bash", "-c", "nc -q -1 -l -U /var/run/sock & p=$! && sleep 1 && echo foobar-asdf | nc -q 0 -U /var/run/sock && wait $p") if err != nil { t.Fatalf("docker run failed: %v", err) } |