mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 09:51:50 +00:00
Wait for servald daemon to enter main loop for more reliable tests
This commit is contained in:
parent
dfd6989a7f
commit
abfe6963d2
@ -156,7 +156,9 @@ schedule(&_sched_##X); }
|
||||
SCHEDULE(fd_periodicstats, 3000, 500);
|
||||
|
||||
#undef SCHEDULE
|
||||
|
||||
|
||||
// log message used by tests to wait for the server to start
|
||||
INFO("Server started, entering main loop");
|
||||
/* Check for activitiy and respond to it */
|
||||
while(fd_poll());
|
||||
|
||||
|
@ -283,6 +283,7 @@ start_servald_server() {
|
||||
assert --message="a new servald process is running" --dump-on-fail="$instance_servald_log" [ -n "$new_pids" ]
|
||||
assert --message="servald pidfile process is running" --dump-on-fail="$instance_servald_log" $pidfile_running
|
||||
assert --message="servald log file $instance_servald_log is present" [ -r "$instance_servald_log" ]
|
||||
wait_until grep -q "Server started" "$instance_servald_log"
|
||||
tfw_log "# Started servald server process $instance_name, pid=$servald_pid"
|
||||
pop_instance
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ setup() {
|
||||
assert_no_servald_processes
|
||||
setup_dnahelper
|
||||
start_servald_instances +A
|
||||
assert_all_instance_peers_complete +A
|
||||
}
|
||||
|
||||
finally() {
|
||||
@ -229,7 +228,6 @@ setup_ExecError() {
|
||||
dnahelper=/non/existent
|
||||
assert [ ! -e "$dnahelper" ]
|
||||
start_servald_instances +A
|
||||
assert_all_instance_peers_complete +A
|
||||
}
|
||||
test_ExecError() {
|
||||
executeOk_servald dna lookup 12345
|
||||
@ -255,7 +253,6 @@ done
|
||||
EOF
|
||||
chmod 0755 "$dnahelper"
|
||||
start_servald_instances +A
|
||||
assert_all_instance_peers_complete +A
|
||||
}
|
||||
test_ExecArgs() {
|
||||
executeOk_servald dna lookup 12345
|
||||
|
Loading…
x
Reference in New Issue
Block a user