aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar aehlig <aehlig@google.com>2017-06-08 09:10:23 -0400
committerGravatar John Cater <jcater@google.com>2017-06-08 10:53:13 -0400
commit62490886a54666c5fcc587f3758c785f07d278a5 (patch)
tree7c2f072cc68b24525dadb99ce29d8f13a0490f82 /src
parent7eadc73735d20dd27a20655d902e1456083d2649 (diff)
experimental_ui, rate limiting test: work around output by the client
When the experimental UI is told to rate limit the amount of output generated, this limit does not include startup messages generated by the client. Make the test aware of that behaviour by allowing a bit more output than the UI limit, to take into account the client startup messages. To keep the test still strict increase the output generated by the actions a lot, so that the client output is small compared to what we expect and limit. PiperOrigin-RevId: 158386698
Diffstat (limited to 'src')
-rwxr-xr-xsrc/test/shell/integration/experimental_ui_test.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/test/shell/integration/experimental_ui_test.sh b/src/test/shell/integration/experimental_ui_test.sh
index 6025aadde5..a6529b5854 100755
--- a/src/test/shell/integration/experimental_ui_test.sh
+++ b/src/test/shell/integration/experimental_ui_test.sh
@@ -54,7 +54,7 @@ EOF
cat > pkg/do_output.sh <<EOF
#!/bin/sh
echo Beginning \$1
-for _ in \`seq 1 1024\`
+for _ in \`seq 1 10240\`
do echo '1234567890'
done
echo Ending \$1
@@ -274,18 +274,22 @@ function test_streamed {
function test_output_limit {
# Verify that output limting works
bazel clean --expunge
- # The two actions produce about 10k of output each. As we set an output
- # limit to 5k total, we expect it to be truncated reasonably so that we
+ bazel version
+ # The two actions produce about 100k of output each. As we set an output
+ # limit to 50k total, we expect it to be truncated reasonably so that we
# can see the end of the output of both actions, while still staying in
# the limit.
+ # However, that limit only applies to the output produces by the bazel
+ # server; any startup message generated by the client is on top of that.
+ # So we add another 1k output for what the client has to tell.
bazel build --experimental_ui --curses=yes --color=yes \
- --experimental_ui_limit_console_output=5120 \
+ --experimental_ui_limit_console_output=51200 \
pkg:withOutputA pkg:withOutputB >$TEST_log 2>&1 \
|| fail "expected success"
expect_log 'Ending A'
expect_log 'Ending B'
output_length=`cat $TEST_log | wc -c`
- [ "${output_length}" -le 5120 ] \
+ [ "${output_length}" -le 52224 ] \
|| fail "Output too large, is ${output_length}"
}