diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-14 09:08:25 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-14 09:08:25 +0200 |
commit | 8fda095b6d82490adf550d22af9d4af767789129 (patch) | |
tree | d5a30a0790fa586608ff807540a2f877b81d5614 | |
parent | 7668f04392c529421003f39f6bc3f44e07bee469 (diff) | |
download | rneovim-8fda095b6d82490adf550d22af9d4af767789129.tar.gz rneovim-8fda095b6d82490adf550d22af9d4af767789129.tar.bz2 rneovim-8fda095b6d82490adf550d22af9d4af767789129.zip |
tests: fix/improve "jobwait returns -1 when timed out" #10767
There was a longer timeout for Windows already, but unlike stated in
51d42917f it is not a worst-case, but gets waited for always.
The test is only about "-1" on timeout, so reduce it to this.
Fixes:
16:33:19,309 INFO - not ok 627 - jobs jobwait with timeout argument will return -1 if the wait timed out
16:33:19,309 INFO - # test/functional/core/job_spec.lua @ 707
16:33:19,309 INFO - # Failure message: test/functional/core/job_spec.lua:714: Expected objects to be the same.
16:33:19,309 INFO - # Passed in:
16:33:19,309 INFO - # (table: 0x0db1a3f0) {
16:33:19,309 INFO - # [1] = 'notification'
16:33:19,309 INFO - # [2] = 'wait'
16:33:19,309 INFO - # *[3] = {
16:33:19,309 INFO - # *[1] = {
16:33:19,309 INFO - # *[1] = -1
16:33:19,309 INFO - # [2] = -1 } } }
16:33:19,309 INFO - # Expected:
16:33:19,309 INFO - # (table: 0x0db1a480) {
16:33:19,309 INFO - # [1] = 'notification'
16:33:19,309 INFO - # [2] = 'wait'
16:33:19,309 INFO - # *[3] = {
16:33:19,309 INFO - # *[1] = {
16:33:19,309 INFO - # *[1] = 4
16:33:19,309 INFO - # [2] = -1 } } }
16:33:19,309 INFO - # stack traceback:
16:33:19,309 INFO - # test/functional/core/job_spec.lua:714: in function <test/functional/core/job_spec.lua:707>
-rw-r--r-- | test/functional/core/job_spec.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 180ed9aa02..a1d9f50720 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -707,11 +707,10 @@ describe('jobs', function() it('will return -1 if the wait timed out', function() source([[ call rpcnotify(g:channel, 'wait', jobwait([ - \ jobstart('exit 4'), \ jobstart((has('win32') ? 'Start-Sleep 10' : 'sleep 10').'; exit 5'), - \ ], has('win32') ? 6000 : 100)) + \ ], 100)) ]]) - eq({'notification', 'wait', {{4, -1}}}, next_msg()) + eq({'notification', 'wait', {{-1}}}, next_msg()) end) it('can pass 0 to check if a job exists', function() |