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

AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Exclude_Hydrogens_annealWithBondGraph ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity PythonUI_with_named_parameters StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since 6458e7 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: 1.8 KB
RevLine 
[c300e2]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
[51a013]6WORKERPORT=11080
7CONTROLLERPORT=11081
8WORKERLISTENPORT=11082
[c300e2]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
[51a013]22# remove worker: server will fail to resolve hostname and remove address from pool
[c300e2]23AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
[51a013]24AT_CHECK([sleep 4], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
[c300e2]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
[51a013]28# shutdown server, should terminate as no workers are left
[c300e2]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
[51a013]34# check that Server is truly down
[c300e2]35AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
[51a013]36AT_CHECK([kill $server_pid], 1, [ignore], [ignore], [kill $worker_pid])
37AT_CHECK([kill $worker_pid], 1, [ignore], [ignore])
[c300e2]38
39AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.