### fragment the molecule and check the number of configs AT_SETUP([Fragmentation - Automation: Worker sets false hostname]) AT_KEYWORDS([fragmentation automation controller poolworker server falsehost]) WORKERPORT=1080 CONTROLLERPORT=1081 WORKERLISTENPORT=1082 TIMEOUT=3 # start service in background ${AUTOTEST_PATH}/JobMarketServer -v 5 --workerport $WORKERPORT --controllerport $CONTROLLERPORT --timeout $TIMEOUT & server_pid=$! AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid]) # let worker enroll in pool ${AUTOTEST_PATH}/JobMarketPoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname falsehost --listen $WORKERLISTENPORT & worker_pid=$! AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) # remove worker AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) AT_CHECK([kill -s 0 $server_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) AT_CHECK([kill -s 0 $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) # shutdown server, should now terminate as no workers are left AT_CHECK([${AUTOTEST_PATH}/JobMarketController --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) # we have to kill worker as he cannot know that Server is gone AT_CHECK([kill $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) # check that Server is truely down AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) AT_CHECK([kill $server_pid $worker_pid], 1, [ignore], [ignore]) AT_CLEANUP