$BATS_TEST_TIMEOUT
–
Number of seconds when tests time out
$BATS_TEST_TIMEOUT
defines the number of seconds, after which a test (including setup()
) will be terminated.
This must be configured in setup_file()
or earlier.
If you define it inside setup_file()
, please make sure to export
.
Please refer to the bats-core manual for further details how to use this.
Links
Examples
- Timeout after 5 seconds
1 2 3 4 5 6 7
#!/usr/bin/env bats BATS_TEST_TIMEOUT=5 @test "Timeout test" { # this will always time out sleep 10 }
BashSupport Pro ist eine Shell-Skript-IDE mit Unterstützung für $BATS_TEST_TIMEOUT von bats-core - probieren Sie es jetzt aus!