source: ThirdParty/JobMarket/tests/regression/testsuite-checkalive.at@ be848d

Action_Thermostats Add_AtomRandomPerturbation Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChemicalSpaceEvaluator EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_oldresults ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps
Last change on this file since be848d was 51a013, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

Ports used by regression tests are now between 11000 and 11999.

  • also changed comments in falsehost test and increased sleep to 4 to match with Server's timeout.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1### fragment the molecule and check the number of configs
2
3AT_SETUP([Fragmentation - Automation: Dead Worker is removed])
4AT_KEYWORDS([fragmentation automation controller poolworker server checkalive])
5
6WORKERPORT=11075
7CONTROLLERPORT=11076
8WORKERLISTENPORT=11077
9
10TIMEOUT=3
11
12# start service in background
13${AUTOTEST_PATH}/JobMarketServer -v 5 --workerport $WORKERPORT --controllerport $CONTROLLERPORT --timeout $TIMEOUT &
14server_pid=$!
15AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
16
17# let worker enroll in pool
18${AUTOTEST_PATH}/JobMarketPoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
19worker_pid=$!
20AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
21
22# create script to call
23AT_DATA([sleep.sh], [#!/bin/bash
24sleep `cat <$1`
25])
26AT_CHECK([chmod +x sleep.sh], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
27# add one jobs via JobAdder that needs at least TIMEOUT time
28AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command createjobs --executable "./sleep.sh" --jobcommand "3"], 0, [stdout], [ignore], [kill $server_pid])
29AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
30AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
31
32# send kill signal to worker such that it shuts down _not_ properly
33AT_CHECK([kill -9 $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
34
35# let more than timeout time pass
36let timetopass=2*$TIMEOUT
37AT_CHECK([sleep $timetopass], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
38
39# clear resubmit job from queue
40AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command removealljobs], 0, [stdout], [ignore], [kill $server_pid])
41AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
42
43# shutdown server, should be without glitch as no worker is left
44AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
45
46# check that Server is truely down
47AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
48AT_CHECK([kill $server_pid $worker_pid], 1, [ignore], [ignore])
49
50AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.