LuaLS / lua-language-server

A language server that offers Lua language support - programmed in Lua
https://luals.github.io
MIT License
3.38k stars 319 forks source link

Flaky tests #2926

Open gepbird opened 3 weeks ago

gepbird commented 3 weeks ago

How are you using the lua-language-server?

Other

Which OS are you using?

Linux

What is the issue affecting?

Other

Expected Behaviour

Tests pass all the time.

Actual Behaviour

Tests sometimes fail.

Reproduction steps

  1. Run ./make.sh

Additional Notes

I'm updating luals in a linux software repository called nixpkgs. There we also run the tests after we build it, and those fail sometimes, see https://github.com/NixOS/nixpkgs/pull/352961#issuecomment-2452494838

Log File

lua-language-server> 测试[tclient]...
lua-language-server> test/tclient/tests/load-relative-library.lua:54: assertion failed!
lua-language-server> stack traceback:
lua-language-server>    [C]: in function 'assert'
lua-language-server>    test/tclient/tests/load-relative-library.lua:54: in upvalue 'callback'
lua-language-server>    script/lclient.lua:129: in function <script/lclient.lua:128>
lua-language-server> stack traceback:
lua-language-server>    script/lclient.lua:123: in function 'await.errorHandle'
lua-language-server>    script/await.lua:35: in function 'await.checkResult'
lua-language-server>    (...tail calls...)
lua-language-server>    script/lclient.lua:201: in local 'callback'
lua-language-server>    script/lclient.lua:232: in method 'update'
lua-language-server>    script/lclient.lua:143: in method 'start'
lua-language-server>    test/tclient/tests/load-relative-library.lua:13: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test/tclient/init.lua:11: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test.lua:48: in upvalue 'test'
lua-language-server>    test.lua:108: in local 'main'
lua-language-server>    test.lua:115: in main chunk
lua-language-server>    (bootstrap.lua):85: in main chunk
lua-language-server>    [C]: in ?
lua-language-server> bin/lua-language-server: script/lclient.lua:124: [19:47:46.386][error][#0:script/lclient.lua:123]: test/tclient/tests/load-relative-library.lua:54: assertion failed!
lua-language-server> stack traceback:
lua-language-server>    [C]: in function 'assert'
lua-language-server>    test/tclient/tests/load-relative-library.lua:54: in upvalue 'callback'
lua-language-server>    script/lclient.lua:129: in function <script/lclient.lua:128>
lua-language-server> stack traceback:
lua-language-server>    script/lclient.lua:123: in function 'await.errorHandle'
lua-language-server>    script/await.lua:35: in function 'await.checkResult'
lua-language-server>    (...tail calls...)
lua-language-server>    script/lclient.lua:201: in local 'callback'
lua-language-server>    script/lclient.lua:232: in method 'update'
lua-language-server>    script/lclient.lua:143: in method 'start'
lua-language-server>    test/tclient/tests/load-relative-library.lua:13: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test/tclient/init.lua:11: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test.lua:48: in upvalue 'test'
lua-language-server>    test.lua:108: in local 'main'
lua-language-server>    test.lua:115: in main chunk
lua-language-server>    (bootstrap.lua):85: in main chunk
lua-language-server>    [C]: in ?
lua-language-server> 
lua-language-server> stack traceback:
lua-language-server>    [C]: in function 'error'
lua-language-server>    script/lclient.lua:124: in function 'await.errorHandle'
lua-language-server>    script/await.lua:35: in function 'await.checkResult'
lua-language-server>    (...tail calls...)
lua-language-server>    script/lclient.lua:201: in local 'callback'
lua-language-server>    script/lclient.lua:232: in method 'update'
lua-language-server>    script/lclient.lua:143: in method 'start'
lua-language-server>    test/tclient/tests/load-relative-library.lua:13: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test/tclient/init.lua:11: in main chunk
lua-language-server>    [C]: in upvalue 'originRequire'
lua-language-server>    test.lua:42: in function 'require'
lua-language-server>    test.lua:48: in upvalue 'test'
lua-language-server>    test.lua:108: in local 'main'
lua-language-server>    test.lua:115: in main chunk
lua-language-server>    (bootstrap.lua):85: in main chunk
lua-language-server>    [C]: in ?
lua-language-server> FAILED: build/_/unit-test 
lua-language-server> bin/lua-language-server test.lua
lua-language-server> ninja: build stopped: subcommand failed.