aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/timer_spec.lua
Commit message (Collapse)AuthorAge
* test: reorg #15698Justin M. Keyes2021-09-17
| | | | | | | | | | | | | | | | | | | | Problem: Subdirectories like "visual", "insert", "normal" encourage people to separate *related* tests for no good reason. Typically the _mode_ is not the relevant topic of a test (and when it is, _then_ create an appropriate describe() or it()). Solution: - Delete the various `test/functional/<mode>/` subdirectories, move their tests to more meaningful topics. - Rename `…/normal/` to `…/editor/`. - Move or merge `…/visual/*` and `…/insert/*` tests into here where appropriate. - Rename `…/eval/` to `…/vimscript/`. - Move `…/viml/*` into here also. * test(reorg): insert/* => editor/mode_insert_spec.lua * test(reorg): cmdline/* => editor/mode_cmdline_spec.lua * test(reorg): eval core tests => eval_spec.lua
* Revert "vim-patch:8.1.0822: peeking and flushing output slows down execution"Jan Edmund Lazo2020-12-31
| | | | This reverts commit 0519a75f6eca1065a4d0184f99c71ae03a99b9b1.
* vim-patch:8.1.0822: peeking and flushing output slows down executionJan Edmund Lazo2020-12-25
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* test/timer_spec: increase base timeoutJan Edmund Lazo2020-12-01
| | | | | | | | | | | | | The following keeps happening in my local environment because the timeout is too short. [ FAILED ] test/functional/eval/timer_spec.lua @ 208: timers do not crash when processing events in the handler test/functional/eval/timer_spec.lua:219: retry() attempts: 1 test/helpers.lua:73: Expected objects to be the same. Passed in: (number) 0 Expected: (number) 1
* timer_spec: fix/harden flaky tests (#11080)Daniel Hahler2019-09-24
| | | | | | | | | | | | | | | | | | | | | | Those are flaky when using luacov (which causes reproducible slowness). E.g.: [ ERROR ] test/functional\eval\timer_spec.lua @ 105: timers can invoke redraw in blocking getchar() call test\functional\ui\screen.lua:587: Row 3 did not match. Expected: |ITEM 1 | |ITEM 2 | |*{1:~ }| |{1:~ }| |{1:~ }| |^ | Actual: |ITEM 1 | |ITEM 2 | |*ITEM 3 | |{1:~ }| |{1:~ }| |^ |
* test: "can have two timers": retry()Justin M. Keyes2019-09-01
| | | | ref #10768
* test/ui: update tests for new msg_grid implementationBjörn Linse2019-09-01
|
* timer_spec: shorter timeout with "doesn't mess up the cmdline" (#10769)Daniel Hahler2019-08-26
| | | | | It was increased in dd21cd2a4 to avoid flakiness, but takes 1s then always. This specifies a shorter timeout again, uisng `load_adjust`.
* tests: support msg with global_helpers.ok (#10820)Daniel Hahler2019-08-21
| | | | | | Ref: https://github.com/neovim/neovim/pull/10768#discussion_r315904175 Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
* tests: timer_spec: lower timeout, avoids flakinessDaniel Hahler2019-08-20
| | | | | | | | | | | | | | | | | | | Inspired by quickbuild failure, where `g:val` was increased already: 20:07:04,227 INFO - not ok 1164 - timers works with repeat two 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua @ 36 20:07:04,227 INFO - # Failure message: test/functional/eval/timer_spec.lua:38: Expected objects to be the same. 20:07:04,227 INFO - # Passed in: 20:07:04,227 INFO - # (number) 1 20:07:04,227 INFO - # Expected: 20:07:04,227 INFO - # (number) 0 20:07:04,227 INFO - # stack traceback: 20:07:04,227 INFO - # test/functional/eval/timer_spec.lua:38: in function <test/functional/eval/timer_spec.lua:36> Uses a pattern of `eq()`ing `timer_start` and `g:val` in the same `eval` call, and decreases timeouts in general. Improves runtime from ~5s to <2s.
* tests: use larger timeout with "timers can be stopped from the handler" (#10760)Daniel Hahler2019-08-14
| | | | | | | | | | | | | | | | Seen on quickbuild: 23:01:01,289 INFO - not ok 1172 - timers can be stopped from the handler 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua @ 154 23:01:01,289 INFO - # Failure message: test/functional/eval/timer_spec.lua:166: Expected objects to be the same. 23:01:01,289 INFO - # Passed in: 23:01:01,289 INFO - # (number) 3 23:01:01,289 INFO - # Expected: 23:01:01,289 INFO - # (number) 0 23:01:01,289 INFO - # stack traceback: 23:01:01,289 INFO - # test/functional/eval/timer_spec.lua:166: in function <test/functional/eval/timer_spec.lua:154> Log: http://neovim-qb.szakmeister.net/build/24288 Ref: https://github.com/neovim/neovim/pull/10364
* tests: fix flaky "timers can be stopped from the handler" (#10364)Daniel Hahler2019-06-29
| | | | | | | | | | | | Seen on Travis (osx): [ RUN ] timers can be stopped from the handler: FAIL .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same. Passed in: (number) 2 Expected: (number) 3 stack traceback: .../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>
* tests: increase timeout with "timers doesn't mess up the cmdline" (#10212)Daniel Hahler2019-06-13
| | | | | | | | | | | | This might be required on (slower) CI. [ RUN ] timers doesn't mess up the cmdline: ERR test/functional/ui/screen.lua:562: expected intermediate screen state before final screen state stack traceback: test/functional/ui/screen.lua:562: in function '_wait' test/functional/ui/screen.lua:366: in function 'expect' .../build/neovim/neovim/test/functional/eval/timer_spec.lua:221: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:199> Ref: https://travis-ci.org/neovim/neovim/jobs/544974506#L3861
* test: adjust timer_specJustin M. Keyes2019-01-31
|
* tests: load-adjust timer tests (functionaltest)Marco Hinz2019-01-17
|
* test: adjust time-sensitive tests (#9220)Justin M. Keyes2018-11-10
| | | | | | | | | | | | | - window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so that it follows output. - inccommand_spec.lua: Increase timeout to allow 2nd retry. - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms.
* test/timer_spec: relax lower-boundJustin M. Keyes2018-11-05
| | | | | | | | | | | | | Test is unreliable on macOS 10.13. The lower-bound isn't central to the purpose of the test, so just relax it. ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms. related: #6829
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* test: adjust timer testsJustin M. Keyes2018-10-13
| | | | | Timer tests are less reliable on Travis CI macOS 10.12 (most egregious). Also somewhat on 10.13.
* tests: call getchar(1) in timer callbackJan Edmund Lazo2018-09-04
| | | | Test changes from 8.0.1020 and 8.0.1048.
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* functests: Try sleeping a bit moreZyX2017-03-29
|
* test/timer_spec.lua: Relax expected count.Justin M. Keyes2017-01-19
| | | | | | Test sometimes fails on AppVeyor (Windows). 300/50=6, but there could be environment factors that miss the timer interval on the "edges". timer_start() does not have such a hard requirement.
* events: allow event processing in getchar()Björn Linse2016-10-15
| | | | | | this is consistent with vim, and is necessary for plugins that implement their own input modes using "getchar()" and still want to do async event processing.
* tests: don't ignore highlights in various testsBjörn Linse2016-08-14
|
* timers: do not crash after processing events in the handlerBjörn Linse2016-08-10
|
* timers: make repeat=0 work one-shot (consistent with vim)Björn Linse2016-06-29
|
* timers: make timers work with zero timeoutBjörn Linse2016-06-29
|
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
* cmdline: Redraw the cmdline after processing eventsBjörn Linse2016-05-24
| | | | | | | vim-patch:7.4.1603 TODO(bfredl): if we allow events in HITRETURN and ASKMORE states, we need to add the necessary redraws as well.
* eval: implement timers. vim-patch: 7.4.1578, 7.4.1831Björn Linse2016-05-24
For the moment, timers are triggered during sleep, but not in wait-for-input modes, like press-RETURN or f_getchar()