Skip to content
Snippets Groups Projects
Unverified Commit f1358010 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

Integration tests: Slight changes in timeout reporting

parent c5a1ddb7
No related branches found
No related tags found
1 merge request!106Master merge jt
Pipeline #48197 passed with warnings
......@@ -158,12 +158,15 @@ void _TimeoutAqlTest ( const std::chrono::microseconds & timeout, const ext::vec
INFO ( "Child output was: >" << childOutput << "<" );
REQUIRE ( WEXITSTATUS ( status ) == 0 );
} else if ( WIFSIGNALED ( status ) ) {
INFO ( "AqlTest failure. Trying to execute: " << formatQueries ( queries ) );
INFO ( "Seed was: " << seed );
INFO ( "Child output was: >" << childOutput << "<" );
if ( WTERMSIG ( status ) == SIGTERM || WTERMSIG ( status ) == SIGKILL ) { /* killed by timeout control */
WARN ( "Timeout (" << timeout.count ( ) << " us) reached in test (" << queries << ")" );
WARN ( "AqlTest timeout (" << timeout.count ( ) << " us) reached. Trying to execute:\n" << formatQueries ( queries ) <<
"Seed was: " << seed << "\n" <<
"Child output was: >" << childOutput << "<" );
CHECK_NOFAIL ( "timeout warning" == nullptr );
} else {
INFO ( "AqlTest failure. Trying to execute: " << formatQueries ( queries ) );
INFO ( "Seed was: " << seed );
INFO ( "Child output was: >" << childOutput << "<" );
INFO ( "Child process signaled, signal " << WTERMSIG ( status ) << " (" << strsignal ( WTERMSIG ( status ) ) << ")" );
FAIL ( );
}
......
......@@ -4,7 +4,7 @@
#include "testing/TimeoutAqlTest.hpp"
#include "testing/TestFiles.hpp"
 
TEST_CASE ( "Dummy Test", "[integration][dummy][!mayfail][!hide]" ) {
TEST_CASE ( "AQL Test", "[integration][dummy][!shouldfail][!hide]" ) {
ext::vector < std::string > qs = {
"execute 1",
"exec"
......@@ -22,9 +22,19 @@ TEST_CASE ( "Segfault Test", "[integration][dummy][!shouldfail][!hide]" ) {
TimeoutAqlTest ( 1s, qs );
}
 
TEST_CASE ( "Failed Test", "[integration][dummy][!hide][!shouldfail]" ) {
ext::vector < std::string > qs = {
"quit compare::PrimitiveCompare 1 2",
};
TimeoutAqlTest ( 1s, qs );
}
TEST_CASE ( "Timeout Test", "[integration][dummy][!hide]" ) {
// we dont fail the tests (CHECK_NOFAIL) is used, so this is probably useless
ext::vector < std::string > qs = {
"execute \"generated some output\"",
"execute \"generated some output for the second time\"",
};
 
TimeoutAqlTest ( 1us, qs );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment