-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: output_spec: fix "throttles shell-command output greater than ~10KB" #10854
base: master
Are you sure you want to change the base?
Conversation
…~10KB" Flaky on osx. Looks like all the output is there already. [ ERROR ] test/functional/ui/output_spec.lua @ 52: shell command :! throttles shell-command output greater than ~10KB test/functional/ui/screen.lua:581: Failed to match any screen lines. Expected (anywhere): " %." Actual: |29997: foo | |29998: foo | |29999: foo | |30000: foo | | | |{UNEXPECTED foreground = tonumber('0x000002'):Press ENTER or type command to continue}{1: } | |{3:-- TERMINAL --} | stack traceback: test/functional/ui/screen.lua:581: in function '_wait' test/functional/ui/screen.lua:368: in function 'expect' test/functional/ui/output_spec.lua:57: in function <test/functional/ui/output_spec.lua:52>
Failed:
How/why does it fail after ~300ms when it should wait for 20s though? |
The failure looks like it matched the ".", but then tested again afterwards, where it was removed (temporarily), and |
Alternatively/additionally something like this might be useful, to display a dot always: diff --git i/src/nvim/os/shell.c w/src/nvim/os/shell.c
index 19d199f4d..79f6602eb 100644
--- i/src/nvim/os/shell.c
+++ w/src/nvim/os/shell.c
@@ -390,7 +390,7 @@ static bool out_data_decide_throttle(size_t size)
static uint64_t started = 0; // Start time of the current throttle.
static size_t received = 0; // Bytes observed since last throttle.
static size_t visit = 0; // "Pulse" count of the current throttle.
- static char pulse_msg[] = { ' ', ' ', ' ', '\0' };
+ static char pulse_msg[] = { '.', ' ', ' ', '\0' };
if (!size) {
bool previous_decision = (visit > 0);
@@ -418,7 +418,6 @@ static bool out_data_decide_throttle(size_t size)
size_t tick = (visit % 20 == 0)
? 3 // Force all dots "..." on last visit.
: (visit % 4);
- pulse_msg[0] = (tick == 0) ? ' ' : '.';
pulse_msg[1] = (tick == 0 || 1 == tick) ? ' ' : '.';
pulse_msg[2] = (tick == 0 || 1 == tick || 2 == tick) ? ' ' : '.';
if (visit == 1) { |
With retry:
|
The main issue here appears to be though that |
Pulse every 0.2s only, displaying first dot always ([1]). This makes `!yes` look much better (less busy) - although that might have been intentional?!. 1: neovim#10854 (comment)
Latest:
Suspicious that's around 95 always (some global state kept when repeating?!). |
I think there should be something that does not fail due to later changes. |
That is the intended semantics of |
The meaning of |
@bfredl |
yes, maybe the existing |
Last:
|
Currently there is:
I.e. we could have the current behavior be described by specifying But using However, it seems that it appears to be still flaky given what |
Not sure I like |
Adding more flags would mean more combinations, most of which are nonsense. |
But then rather that |
But the alternative never was to add "more flags", rather just rename the |
One new flag would be needed though ( But it does not seem to be the problem with #10854 (comment) after all - it should only be a warning after all, not cause it to fail. (still good to have a way to suppress this warning then) |
This was about |
Doesn't |
No, none of |
|
maybe, but |
Latest failure for that test:
(https://travis-ci.org/neovim/neovim/jobs/594313045#L6551)