source: ThirdParty/JobMarket/tests/regression/testsuite-falsehost.at@ f67dfb

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since f67dfb was f67dfb, checked in by Frederik Heber <heber@…>, 8 years ago

FIX: FragmentScheduler and PoolWorker now handle unresolvable addresses properly.

  • OperationQueue now checks whether last operation has succeeded of failed and calls a failure callback in error case which is a NoOp by default.
  • if PoolWorker's Ops fail, he will automatically shutdown now.
  • if FragmentScheduler's Ops fail, he will automatically remove the worker from its pool.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1### fragment the molecule and check the number of configs
2
3AT_SETUP([Fragmentation - Automation: Worker sets false hostname])
4AT_KEYWORDS([fragmentation automation controller poolworker server falsehost])
5
6WORKERPORT=1080
7CONTROLLERPORT=1081
8WORKERLISTENPORT=1082
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 falsehost --listen $WORKERLISTENPORT &
19worker_pid=$!
20AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
21
22# remove worker
23AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
24AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
25AT_CHECK([kill -s 0 $server_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
26AT_CHECK([kill -s 0 $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
27
28# shutdown server, should now terminate as no workers are left
29AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
30
31# we have to kill worker as he cannot know that Server is gone
32AT_CHECK([kill $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
33
34# check that Server is truely down
35AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
36AT_CHECK([kill $server_pid $worker_pid], 1, [ignore], [ignore])
37
38AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.