mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
ci: add a watchdog timer thread to ringbuffer_test.v, to make sure the program exits in a reasonable time (~10s). Let the test be retried 2 times in a row if it fails.
This commit is contained in:
parent
9f0094b0b4
commit
810a90efa6
@ -1,7 +1,17 @@
|
||||
// vtest build: !gcc-windows && !msvc-windows && !tcc-windows
|
||||
import datatypes.lockfree
|
||||
// vtest retry: 2
|
||||
import time
|
||||
import sync
|
||||
import datatypes.lockfree
|
||||
|
||||
fn testsuite_begin() {
|
||||
spawn fn () {
|
||||
println('watchdog thread started...')
|
||||
// Ensure that the whole program will finish,
|
||||
// even in the case of a deadlock (which seems to happen on windows)
|
||||
time.sleep(10_000 * time.millisecond)
|
||||
exit(2)
|
||||
}()
|
||||
}
|
||||
|
||||
// Test basic push and pop operations
|
||||
fn test_push_and_pop() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user