From 7451fdd1e88ea0b34a0a94ef333dbb50a4c4f353 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 5 Jun 2018 11:43:23 -0700 Subject: [PATCH] Make streaming test run longer than connection timeout This is an attempt to make the existing streaming log test more robust based on observed behavior in the wild. Basically we need to make sure that if nothing is logged for longer than our streaming connection timeout that we still get all the data. Change-Id: I0a60c92d8a75dac195f6b85de379b612a2148e37 --- .../remote-zuul-stream/git/org_project/playbooks/command.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml b/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml index dec392381d..db7292facd 100644 --- a/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml +++ b/tests/fixtures/config/remote-zuul-stream/git/org_project/playbooks/command.yaml @@ -23,7 +23,9 @@ - name: Show contents of first file command: "cat {{ ansible_user_dir }}/command_test_file1" - name: Show contents of second file - command: "cat {{ ansible_user_dir }}/command_test_file2" + # We use a sleep here to ensure that we log even after + # a period of no logging. + shell: "sleep 6 && cat {{ ansible_user_dir }}/command_test_file2" # Test a task with a handler - name: Run a command with notifying a handler