Skip to content

Commit

Permalink
Merge pull request #41 from jwillemsen/jwi-processname
Browse files Browse the repository at this point in the history
Give an error when the amount of processes is zero, could be that the…
  • Loading branch information
jwillemsen authored Oct 14, 2020
2 parents 1f719ed + f803a23 commit a6207ba
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/locality_manager/in_process/check_lm.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/sh

cmd_output1=$(ps ax | grep "dancex11_deployment_manager.*dancex11_locality_dm_handler")
cmd_output=$(echo "$cmd_output1" | grep -c "dancex11_deployment_manager.*-n.*LocalityInstance")
cmd_output=$(echo "$cmd_output1" | grep -c "dancex11_deployment_manager.*-n.*LocalityInstance")

if [ "$cmd_output" == "0" ] ; then
echo "Success! The NM have been contacted and no LM have been spawned.";

rc=0

cmd_output=$(ps auxc | grep NM_with_inproce | wc -l)
if [ "$cmd_output" -ne "1" ] ; then

if [ "$cmd_output" -eq "0" ] ; then
echo "ERROR: Process name does not appear to have changed."
echo "Process listing:"
ps auxc
rc=1
else
echo "Success! NM Process name appears to have been changed appropriately.";
fi

exit $rc
else
echo "ERROR: Unexpected number of LM processes detected:"
Expand Down
1 change: 1 addition & 0 deletions tests/locality_manager/in_process/run_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ sub kill_open_processes {
}
# in case shutdown did not perform as expected
$tg_daemon->KillAll ('dancex11_deployment_manager');
$tg_daemon->KillAll ('NM_with_inprocess_LM');
}

sub run_node_daemon {
Expand Down
2 changes: 1 addition & 1 deletion tests/locality_manager/process_name/check_process_name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cmd_output=$(ps auxc | grep newlocality_tes | wc -l)

if [ "$cmd_output" -ne "1" ] ; then
if [ "$cmd_output" -eq "0" ] ; then
echo "ERROR: Process name does not appear to have changed."
echo "Process listing:"
ps auxc
Expand Down
1 change: 1 addition & 0 deletions tests/locality_manager/process_name/run_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ sub kill_open_processes {
}
# in case shutdown did not perform as expected
$tg_daemon->KillAll ('dancex11_deployment_manager');
$tg_daemon->KillAll ('newlocality_test');
}

sub run_node_daemon {
Expand Down
1 change: 1 addition & 0 deletions tests/locality_manager/process_name/run_test_snl.pl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ sub kill_open_processes {
# in case shutdown did not perform as expected
for ($i = 0; $i < $nr_daemon; ++$i) {
$tg_daemons[$i]->KillAll ('dancex11_deployment_manager');
$tg_daemons[$i]->KillAll ('newlocality_test');
}
}

Expand Down

0 comments on commit a6207ba

Please sign in to comment.