diff --git a/QueueSystems/ErrorHandling/Console/BadQueue/catalogue.texttest.nomad b/QueueSystems/ErrorHandling/Console/BadQueue/catalogue.texttest.nomad new file mode 100644 index 000000000..f2532d6f6 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/BadQueue/catalogue.texttest.nomad @@ -0,0 +1 @@ +No files or directories were created, edited or deleted. diff --git a/QueueSystems/ErrorHandling/Console/BadQueue/errors.texttest.nomad b/QueueSystems/ErrorHandling/Console/BadQueue/errors.texttest.nomad new file mode 100644 index 000000000..0183dfd00 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/BadQueue/errors.texttest.nomad @@ -0,0 +1 @@ +Cannot use Nomad: no ready nodes with the raw_exec driver in node pool 'non_existent' diff --git a/QueueSystems/ErrorHandling/Console/BadQueue/exitcode.texttest.nomad b/QueueSystems/ErrorHandling/Console/BadQueue/exitcode.texttest.nomad new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/BadQueue/exitcode.texttest.nomad @@ -0,0 +1 @@ +1 diff --git a/QueueSystems/ErrorHandling/Console/BadQueue/output.texttest.nomad b/QueueSystems/ErrorHandling/Console/BadQueue/output.texttest.nomad new file mode 100644 index 000000000..e69de29bb diff --git a/QueueSystems/ErrorHandling/Console/BadQueue/pythonmocks.texttest.nomad b/QueueSystems/ErrorHandling/Console/BadQueue/pythonmocks.texttest.nomad new file mode 100644 index 000000000..2781d746d --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/BadQueue/pythonmocks.texttest.nomad @@ -0,0 +1,16 @@ +<-PYT:import texttestlib.queuesystem.nomadapi +<-PYT:texttestlib.queuesystem.nomadapi.__name__ +->RET:'texttestlib.queuesystem.nomadapi' +<-PYT:texttestlib.queuesystem.nomadapi.__path__ +->RET:raise AttributeError("module 'texttestlib.queuesystem.nomadapi' has no attribute '__path__'") +<-PYT:secrets.token_hex(4) +->RET:'61dd0f76' +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/catalogue.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/catalogue.texttest.nomad new file mode 100644 index 000000000..f2532d6f6 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/NotInstalled/catalogue.texttest.nomad @@ -0,0 +1 @@ +No files or directories were created, edited or deleted. diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/environment.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/environment.texttest.nomad new file mode 100644 index 000000000..d7d42e132 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/NotInstalled/environment.texttest.nomad @@ -0,0 +1,2 @@ +# Nothing listens here +NOMAD_ADDR:http://127.0.0.1:1 diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/errors.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/errors.texttest.nomad new file mode 100644 index 000000000..366072f0c --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/NotInstalled/errors.texttest.nomad @@ -0,0 +1 @@ +Cannot use Nomad: could not contact Nomad at http://127.0.0.1:1: Connection refused diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/exitcode.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/exitcode.texttest.nomad new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/NotInstalled/exitcode.texttest.nomad @@ -0,0 +1 @@ +1 diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/output.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/output.texttest.nomad new file mode 100644 index 000000000..e69de29bb diff --git a/QueueSystems/ErrorHandling/Console/NotInstalled/pythonmocks.texttest.nomad b/QueueSystems/ErrorHandling/Console/NotInstalled/pythonmocks.texttest.nomad new file mode 100644 index 000000000..29cd70d1e --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/NotInstalled/pythonmocks.texttest.nomad @@ -0,0 +1,11 @@ +<-PYT:import texttestlib.queuesystem.nomadapi +<-PYT:texttestlib.queuesystem.nomadapi.__name__ +->RET:'texttestlib.queuesystem.nomadapi' +<-PYT:texttestlib.queuesystem.nomadapi.__path__ +->RET:raise AttributeError("module 'texttestlib.queuesystem.nomadapi' has no attribute '__path__'") +<-PYT:secrets.token_hex(4) +->RET:'06d9c696' +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:raise Instance('NomadError(Exception)', 'nomaderror__v1_nodes') +<-PYT:nomaderror__v1_nodes.__str__() +->RET:'could not contact Nomad at http://127.0.0.1:1: Connection refused' diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/catalogue.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/catalogue.texttest.nomad new file mode 100644 index 000000000..68920c45c --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/catalogue.texttest.nomad @@ -0,0 +1,10 @@ +The following new files/directories were created: + +----texttesttmp +--------sleep.killing.10Nov100904.16132 +------------batchreport.sleep.killing +------------slavelogs +------------sleep.killing +----------------Basic +--------------------framework_tmp +------------------------teststate diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/environment.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/environment.texttest.nomad new file mode 100644 index 000000000..e8025ec64 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/environment.texttest.nomad @@ -0,0 +1 @@ +TEXTTEST_QS_POLL_WAIT:5 diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/errors.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/errors.texttest.nomad new file mode 100644 index 000000000..e69de29bb diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/exitcode.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/exitcode.texttest.nomad new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/exitcode.texttest.nomad @@ -0,0 +1 @@ +1 diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/externalmocks.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/externalmocks.texttest.nomad new file mode 100644 index 000000000..da66ccdac --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/externalmocks.texttest.nomad @@ -0,0 +1,2 @@ +<-SRV:TextTest slave server started on 10.200.2.44:64228 +<-SRV:Completed submission of all tests diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/output.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/output.texttest.nomad new file mode 100644 index 000000000..4f777d769 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/output.texttest.nomad @@ -0,0 +1,24 @@ +Nomad job IDs for this run start with texttest-33efae9a- +Using nomad queues for Application SLEEP, version killing +Q: Submitting SLEEP.killing test-case Basic to default nomad queue +S: SLEEP.killing test-case Basic not compared: +nomad job exited +Job ID was texttest-33efae9a-1-Test-Basic-SLEEP.killing +---------- Full accounting info from Nomad ---------- +Allocation 00b2ebf7-b50e-f9bb-27ff-7a68bf9846e4 on node PDC-1693 is failed + Received: Task received by client + Task Setup: Building Task Directory + Started: Task started by client + Terminated: Exit Code: 1 + Not Restarting: Policy allows no restarts +---------- End of slave standard error ---------- +Unable to load application from file 'config.sleep' - Cannot find file '$STANDARD_PERSONAL' to import config file settings from. + +Results: + +Tests that did not succeed: + SLEEP.killing test-case Basic not compared: nomad job exited + +Tests Run: 1, Incomplete: 1 +Creating batch report for application SLEEP ... +File written. diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/personaldir.nomad/config b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/personaldir.nomad/config new file mode 100644 index 000000000..23f3214c5 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/personaldir.nomad/config @@ -0,0 +1,3 @@ +queue_system_module:nomad + +# Unlike the other Nomad tests, don't send STANDARD_PERSONAL, so that the slave crashes on startup diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/pythonmocks.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/pythonmocks.texttest.nomad new file mode 100644 index 000000000..4fd055e8d --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/pythonmocks.texttest.nomad @@ -0,0 +1,78 @@ +<-PYT:import texttestlib.queuesystem.nomadapi +<-PYT:texttestlib.queuesystem.nomadapi.__name__ +->RET:'texttestlib.queuesystem.nomadapi' +<-PYT:texttestlib.queuesystem.nomadapi.__path__ +->RET:raise AttributeError("module 'texttestlib.queuesystem.nomadapi' has no attribute '__path__'") +<-PYT:secrets.token_hex(4) +->RET:'33efae9a' +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] +<-PYT:texttestlib.queuesystem.nomadapi.request('POST', '/v1/jobs', {'Job': {'Constraints': [], + 'Datacenters': ['*'], + 'ID': 'texttest-33efae9a-1-Test-Basic-SLEEP.killing', + 'Name': 'Test-Basic-SLEEP.killing', + 'NodePool': 'default', + 'TaskGroups': [{'Count': 1, + 'Name': 'slave', + 'ReschedulePolicy': {'Attempts': 0, 'Unlimited': False}, + 'RestartPolicy': {'Attempts': 0, 'Mode': 'fail'}, + 'Tasks': [{'Config': {'args': ['-home', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\ErrorHandling\\Console\\PollSlaveCrash', + '-d', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\ErrorHandling\\Console\\PollSlaveCrash\\TargetApp', + '-a', + 'sleep.killing', + '-l', + '-tp', + 'Basic', + '-slave', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\ErrorHandling\\Console\\PollSlaveCrash\\texttesttmp\\sleep.killing.16Nov162446.61044', + '-servaddr', + '127.0.0.1:64958', + '-b', + 'short_local'], + 'command': 'C:\\projects\\git\\texttest\\bin\\texttest'}, + 'Driver': 'raw_exec', + 'Env': {'STANDARD': 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\ErrorHandling\\Console\\PollSlaveCrash\\standard'}, + 'KillTimeout': 60000000000, + 'Name': 'slave', + 'Resources': {'CPU': 3000}}]}], + 'Type': 'batch'}}) +->RET:{'EvalCreateIndex': 1611, + 'EvalID': '60afac7e-5ce0-49f2-d74a-a9ac3aac969c', + 'Index': 1611, + 'JobModifyIndex': 1611, + 'KnownLeader': False, + 'LastContact': 0, + 'NextToken': '', + 'Warnings': ''} +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/jobs', prefix='texttest-33efae9a-') +->RET:[{'ID': 'texttest-33efae9a-1-Test-Basic-SLEEP.killing', 'Status': 'dead'}] +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/job/texttest-33efae9a-1-Test-Basic-SLEEP.killing/allocations') +->RET:[{'ClientStatus': 'failed', + 'ID': '00b2ebf7-b50e-f9bb-27ff-7a68bf9846e4', + 'NodeName': 'PDC-1693', + 'TaskStates': {'slave': {'Events': [{'DisplayMessage': 'Task received by client', 'Type': 'Received'}, + {'DisplayMessage': 'Building Task Directory', 'Type': 'Task Setup'}, + {'DisplayMessage': 'Task started by client', 'Type': 'Started'}, + {'DisplayMessage': 'Exit Code: 1', 'Type': 'Terminated'}, + {'DisplayMessage': 'Policy allows no restarts', 'Type': 'Not Restarting'}], + 'Failed': True}}}] +<-PYT:texttestlib.queuesystem.nomadapi.request('GET', '/v1/client/fs/logs/00b2ebf7-b50e-f9bb-27ff-7a68bf9846e4', params={'offset': 4096, 'origin': 'end', 'plain': 'true', 'task': 'slave', 'type': 'stderr'}, parseJson=False) +->RET:"Unable to load application from file 'config.sleep' - Cannot find file '$STANDARD_PERSONAL' to import config file settings from.\n" diff --git a/QueueSystems/ErrorHandling/Console/PollSlaveCrash/targetReport.texttest.nomad b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/targetReport.texttest.nomad new file mode 100644 index 000000000..beef602cf --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/PollSlaveCrash/targetReport.texttest.nomad @@ -0,0 +1,29 @@ +unrunnable=1 +10Nov2026 +SLEEP killing : 1 tests : 1 unrunnable + +Summary of all Unsuccessful tests follows... +--------------------------------------------------------------------------------- +The following tests could not be run : +In SLEEP.killing test-suite TargetApp: + - SLEEP.killing test-case Basic : nomad job exited + + +Details of all Unsuccessful tests follows... +--------------------------------------------------------------------------------- + +Detailed information for the tests that could not be run follows... +-------------------------------------------------------- +TEST could not be run : SLEEP.killing test-case Basic (under Basic) +nomad job exited +Job ID was texttest-33efae9a-1-Test-Basic-SLEEP.killing +---------- Full accounting info from Nomad ---------- +Allocation 00b2ebf7-b50e-f9bb-27ff-7a68bf9846e4 on node PDC-1693 is failed + Received: Task received by client + Task Setup: Building Task Directory + Started: Task started by client + Terminated: Exit Code: 1 + Not Restarting: Policy allows no restarts +---------- End of slave standard error ---------- +Unable to load application from file 'config.sleep' - Cannot find file '$STANDARD_PERSONAL' to import config file settings from. + diff --git a/QueueSystems/ErrorHandling/Console/testsuite.texttest.nomad b/QueueSystems/ErrorHandling/Console/testsuite.texttest.nomad new file mode 100644 index 000000000..2a2ffc941 --- /dev/null +++ b/QueueSystems/ErrorHandling/Console/testsuite.texttest.nomad @@ -0,0 +1,8 @@ +# See what happens if Nomad can't be contacted +NotInstalled + +# Test that we can override default_queue via the config file, and what happens when the node pool doesn't exist +BadQueue + +# We should notice crashed slaves without waiting for the user to kill them, and report what Nomad knows +PollSlaveCrash diff --git a/QueueSystems/ErrorHandling/testsuite.texttest.nomad b/QueueSystems/ErrorHandling/testsuite.texttest.nomad new file mode 100644 index 000000000..6566834f5 --- /dev/null +++ b/QueueSystems/ErrorHandling/testsuite.texttest.nomad @@ -0,0 +1 @@ +Console diff --git a/QueueSystems/NormalOperation/Console/Batch2Tests/catalogue.texttest.nomad b/QueueSystems/NormalOperation/Console/Batch2Tests/catalogue.texttest.nomad new file mode 100644 index 000000000..6db798034 --- /dev/null +++ b/QueueSystems/NormalOperation/Console/Batch2Tests/catalogue.texttest.nomad @@ -0,0 +1,13 @@ +The following new files/directories were created: + +----texttesttmp +--------local.10Nov100541.46372 +------------batchreport.sleep +------------slavelogs +------------sleep +----------------Basic +--------------------framework_tmp +------------------------teststate +----------------Basic2 +--------------------framework_tmp +------------------------teststate diff --git a/QueueSystems/NormalOperation/Console/Batch2Tests/externalmocks.texttest.nomad b/QueueSystems/NormalOperation/Console/Batch2Tests/externalmocks.texttest.nomad new file mode 100644 index 000000000..965495042 --- /dev/null +++ b/QueueSystems/NormalOperation/Console/Batch2Tests/externalmocks.texttest.nomad @@ -0,0 +1,462 @@ +<-SRV:TextTest slave server started on 10.200.2.44:61722 +<-SRV:Completed submission of all tests +->CLI:35040 +sleep:Basic +ccopy_reg +_reconstructor +p0 +(ctexttestlib.default.runtest +Running +p1 +c__builtin__ +object +p2 +Ntp3 +Rp4 +(dp5 +Vobservers +p6 +(lp7 +sVpassSelf +p8 +I00 +sVcategory +p9 +Vrunning +p10 +sVfreeText +p11 +VRunning on PDC-1693 +p12 +sVbriefText +p13 +VRUN (PDC-1693) +p14 +sVstarted +p15 +I1 +sVcompleted +p16 +I0 +sVexecutionHosts +p17 +(lp18 +VPDC-1693 +p19 +asVlifecycleChange +p20 +Vstart +p21 +sb. +->CLI:6076 +sleep:Basic2 +ccopy_reg +_reconstructor +p0 +(ctexttestlib.default.runtest +Running +p1 +c__builtin__ +object +p2 +Ntp3 +Rp4 +(dp5 +Vobservers +p6 +(lp7 +sVpassSelf +p8 +I00 +sVcategory +p9 +Vrunning +p10 +sVfreeText +p11 +VRunning on PDC-1693 +p12 +sVbriefText +p13 +VRUN (PDC-1693) +p14 +sVstarted +p15 +I1 +sVcompleted +p16 +I0 +sVexecutionHosts +p17 +(lp18 +VPDC-1693 +p19 +asVlifecycleChange +p20 +Vstart +p21 +sb. +->CLI:35040 +sleep:Basic +ccopy_reg +_reconstructor +p0 +(ctexttestlib.default.comparetest +TestComparison +p1 +c__builtin__ +object +p2 +Ntp3 +Rp4 +(dp5 +Vobservers +p6 +(lp7 +sVpassSelf +p8 +I00 +sVcategory +p9 +Vsuccess +p10 +sVfreeText +p11 +V +p12 +sVbriefText +p13 +g12 +sVstarted +p14 +I1 +sVcompleted +p15 +I1 +sVexecutionHosts +p16 +(lp17 +VPDC-1693 +p18 +asVlifecycleChange +p19 +Vcomplete +p20 +sVallResults +p21 +(lp22 +g0 +(ctexttestlib.default.comparefile +FileComparison +p23 +g2 +Ntp24 +Rp25 +(dp26 +VstdFile +p27 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005cTargetApp\u005cBasic\u005cerrors.sleep +p28 +sVstdCmpFile +p29 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005cframework_tmp\u005cerrors.sleeporigcmp +p30 +sVtmpFile +p31 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005cerrors.sleep +p32 +sVtmpCmpFile +p33 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005cframework_tmp\u005cerrors.sleepcmp +p34 +sVstem +p35 +Verrors +p36 +sVdifferenceCache +p37 +I0 +sVseverity +p38 +I1 +sVdisplayPriority +p39 +I1 +sVbinaryFile +p40 +I00 +sVpreviewGenerator +p41 +g0 +(ctexttestlib.plugins +PreviewGenerator +p42 +g2 +Ntp43 +Rp44 +(dp45 +VmaxWidth +p46 +I500 +sVmaxLength +p47 +I30 +sbsVtextDiffTool +p48 +Vdiff +p49 +sVtextDiffToolMaxSize +p50 +F-1.0 +sVfreeTextBody +p51 +Nsbag0 +(g23 +g2 +Ntp52 +Rp53 +(dp54 +g27 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005cTargetApp\u005cBasic\u005coutput.sleep +p55 +sg29 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005cframework_tmp\u005coutput.sleeporigcmp +p56 +sg31 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005coutput.sleep +p57 +sg33 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic\u005cframework_tmp\u005coutput.sleepcmp +p58 +sg35 +Voutput +p59 +sg37 +I0 +sg38 +I1 +sg39 +I99 +sg40 +I00 +sg41 +g0 +(g42 +g2 +Ntp60 +Rp61 +(dp62 +g46 +I500 +sg47 +I30 +sbsg48 +g49 +sg50 +F-1.0 +sg51 +NsbasVchangedResults +p63 +(lp64 +sVnewResults +p65 +(lp66 +sVmissingResults +p67 +(lp68 +sVcorrectResults +p69 +(lp70 +g25 +ag53 +asVfailedPrediction +p71 +NsVappAbsPath +p72 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005cTargetApp +p73 +sVappWriteDir +p74 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892 +p75 +sb. +->CLI:6076 +sleep:Basic2 +ccopy_reg +_reconstructor +p0 +(ctexttestlib.default.comparetest +TestComparison +p1 +c__builtin__ +object +p2 +Ntp3 +Rp4 +(dp5 +Vobservers +p6 +(lp7 +sVpassSelf +p8 +I00 +sVcategory +p9 +Vfailure +p10 +sVfreeText +p11 +V---------- New result in errors ----------\u000a---------- New result in output ----------\u000aSleeping for 5 seconds...\u000aDone\u000a +p12 +sVbriefText +p13 +V +p14 +sVstarted +p15 +I1 +sVcompleted +p16 +I1 +sVexecutionHosts +p17 +(lp18 +VPDC-1693 +p19 +asVlifecycleChange +p20 +Vcomplete +p21 +sVallResults +p22 +(lp23 +g0 +(ctexttestlib.default.comparefile +FileComparison +p24 +g2 +Ntp25 +Rp26 +(dp27 +VstdFile +p28 +NsVstdCmpFile +p29 +NsVtmpFile +p30 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic2\u005cerrors.sleep +p31 +sVtmpCmpFile +p32 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic2\u005cframework_tmp\u005cerrors.sleepcmp +p33 +sVstem +p34 +Verrors +p35 +sVdifferenceCache +p36 +I0 +sVseverity +p37 +I1 +sVdisplayPriority +p38 +I1 +sVbinaryFile +p39 +I00 +sVpreviewGenerator +p40 +g0 +(ctexttestlib.plugins +PreviewGenerator +p41 +g2 +Ntp42 +Rp43 +(dp44 +VmaxWidth +p45 +I500 +sVmaxLength +p46 +I30 +sbsVtextDiffTool +p47 +Vdiff +p48 +sVtextDiffToolMaxSize +p49 +F-1.0 +sVfreeTextBody +p50 +g14 +sbag0 +(g24 +g2 +Ntp51 +Rp52 +(dp53 +g28 +Nsg29 +Nsg30 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic2\u005coutput.sleep +p54 +sg32 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892\u005csleep\u005cBasic2\u005cframework_tmp\u005coutput.sleepcmp +p55 +sg34 +Voutput +p56 +sg36 +I0 +sg37 +I1 +sg38 +I99 +sg39 +I00 +sg40 +g0 +(g41 +g2 +Ntp57 +Rp58 +(dp59 +g45 +I500 +sg46 +I30 +sbsg47 +g48 +sg49 +F-1.0 +sg50 +VSleeping for 5 seconds...\u000aDone\u000a +p60 +sbasVchangedResults +p61 +(lp62 +sVnewResults +p63 +(lp64 +g26 +ag52 +asVmissingResults +p65 +(lp66 +sVcorrectResults +p67 +(lp68 +sVfailedPrediction +p69 +NsVappAbsPath +p70 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005cTargetApp +p71 +sVappWriteDir +p72 +VC:\u005ctexttest-selftest\u005cst-tmp\u005cci.nomad.10Nov115536.67920\u005ctexttest.nomad\u005cQueueSystems\u005cNormalOperation\u005cConsole\u005cBatch2Tests\u005ctexttesttmp\u005clocal.10Nov115538.70892 +p73 +sb. diff --git a/QueueSystems/NormalOperation/Console/Batch2Tests/output.texttest.nomad b/QueueSystems/NormalOperation/Console/Batch2Tests/output.texttest.nomad new file mode 100644 index 000000000..febbb1268 --- /dev/null +++ b/QueueSystems/NormalOperation/Console/Batch2Tests/output.texttest.nomad @@ -0,0 +1,14 @@ +Nomad job IDs for this run start with texttest-b13d3776- +Using nomad queues for Application SLEEP +Q: Submitting SLEEP test-case Basic to default nomad queue +Q: Submitting SLEEP test-case Basic2 to default nomad queue +S: SLEEP test-case Basic succeeded on PDC-1693 +S: SLEEP test-case Basic2 FAILED on PDC-1693 : new results in errors,output +Results: + +Tests that did not succeed: + SLEEP test-case Basic2 FAILED on PDC-1693 : new results in errors,output + +Tests Run: 2, Failures: 1 +Creating batch report for application SLEEP ... +File written. diff --git a/QueueSystems/NormalOperation/Console/Batch2Tests/pythonmocks.texttest.nomad b/QueueSystems/NormalOperation/Console/Batch2Tests/pythonmocks.texttest.nomad new file mode 100644 index 000000000..51af4ad68 --- /dev/null +++ b/QueueSystems/NormalOperation/Console/Batch2Tests/pythonmocks.texttest.nomad @@ -0,0 +1,118 @@ +<-PYT:import texttestlib.queuesystem.nomadapi +<-PYT:texttestlib.queuesystem.nomadapi.__name__ +->RET:'texttestlib.queuesystem.nomadapi' +<-PYT:texttestlib.queuesystem.nomadapi.__path__ +->RET:raise AttributeError("module 'texttestlib.queuesystem.nomadapi' has no attribute '__path__'") +<-PYT:secrets.token_hex(4) +->RET:'b13d3776' +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] +<-PYT:texttestlib.queuesystem.nomadapi.request('POST', '/v1/jobs', {'Job': {'Constraints': [], + 'Datacenters': ['*'], + 'ID': 'texttest-b13d3776-1-Test-Basic-SLEEP', + 'Name': 'Test-Basic-SLEEP', + 'NodePool': 'default', + 'TaskGroups': [{'Count': 1, + 'Name': 'slave', + 'ReschedulePolicy': {'Attempts': 0, 'Unlimited': False}, + 'RestartPolicy': {'Attempts': 0, 'Mode': 'fail'}, + 'Tasks': [{'Config': {'args': ['-home', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests', + '-d', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\TargetApp', + '-a', + 'sleep', + '-l', + '-tp', + 'Basic', + '-slave', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\texttesttmp\\local.16Nov162440.60072', + '-servaddr', + '127.0.0.1:64944', + '-b', + 'local'], + 'command': 'C:\\projects\\git\\texttest\\bin\\texttest'}, + 'Driver': 'raw_exec', + 'Env': {'CAPTUREMOCK_SERVER': '127.0.0.1:64944', + 'STANDARD': 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\standard', + 'STANDARD_PERSONAL': 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\standard_personal', + 'TEXTTEST_PICKLE_PROTOCOL': '0'}, + 'KillTimeout': 60000000000, + 'Name': 'slave', + 'Resources': {'CPU': 3000}}]}], + 'Type': 'batch'}}) +->RET:{'EvalCreateIndex': 1615, + 'EvalID': '27e08fdf-b3f4-9c77-6b34-018ab4f647ae', + 'Index': 1615, + 'JobModifyIndex': 1615, + 'KnownLeader': False, + 'LastContact': 0, + 'NextToken': '', + 'Warnings': ''} +<-PYT:texttestlib.queuesystem.nomadapi.get('/v1/nodes', resources='true') +->RET:[{'Drivers': {'raw_exec': {'Detected': True, 'Healthy': True}}, + 'ID': '438268a2-3930-b527-1b2d-d0f3800d00b8', + 'Name': 'PDC-1693', + 'NodePool': 'default', + 'NodeResources': {'Cpu': {'CpuShares': 192000, 'TotalCpuCores': 64}}, + 'ReservedResources': {'Cpu': {'CpuShares': 0}}, + 'SchedulingEligibility': 'eligible', + 'Status': 'ready'}] +<-PYT:texttestlib.queuesystem.nomadapi.request('POST', '/v1/jobs', {'Job': {'Constraints': [], + 'Datacenters': ['*'], + 'ID': 'texttest-b13d3776-2-Test-Basic2-SLEEP', + 'Name': 'Test-Basic2-SLEEP', + 'NodePool': 'default', + 'TaskGroups': [{'Count': 1, + 'Name': 'slave', + 'ReschedulePolicy': {'Attempts': 0, 'Unlimited': False}, + 'RestartPolicy': {'Attempts': 0, 'Mode': 'fail'}, + 'Tasks': [{'Config': {'args': ['-home', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests', + '-d', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\TargetApp', + '-a', + 'sleep', + '-l', + '-tp', + 'Basic2', + '-slave', + 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\texttesttmp\\local.16Nov162440.60072', + '-servaddr', + '127.0.0.1:64944', + '-b', + 'local'], + 'command': 'C:\\projects\\git\\texttest\\bin\\texttest'}, + 'Driver': 'raw_exec', + 'Env': {'CAPTUREMOCK_SERVER': '127.0.0.1:64944', + 'STANDARD': 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\standard', + 'STANDARD_PERSONAL': 'C:\\projects\\git\\texttest\\build\\tttmp\\texttest.nomad.16Nov162439.61032\\texttest.nomad\\QueueSystems\\NormalOperation\\Console\\Batch2Tests\\standard_personal', + 'TEXTTEST_PICKLE_PROTOCOL': '0'}, + 'KillTimeout': 60000000000, + 'Name': 'slave', + 'Resources': {'CPU': 3000}}]}], + 'Type': 'batch'}}) +->RET:{'EvalCreateIndex': 1618, + 'EvalID': '408d215a-5e14-0cc4-2dc7-e378d3f1ccd3', + 'Index': 1618, + 'JobModifyIndex': 1618, + 'KnownLeader': False, + 'LastContact': 0, + 'NextToken': '', + 'Warnings': ''} diff --git a/QueueSystems/personaldir.nomad/config b/QueueSystems/personaldir.nomad/config new file mode 100644 index 000000000..c080b07af --- /dev/null +++ b/QueueSystems/personaldir.nomad/config @@ -0,0 +1,10 @@ +queue_system_module:nomad + +queue_system_max_capacity:10 + +# Nomad jobs only get the environment variables we send, and the test's standard config needs this too +queue_system_environment:STANDARD_PERSONAL +# When recording, the slaves send their traffic via CaptureMock and need to know that, +# and must use the same readable pickle protocol as the master +queue_system_environment:CAPTUREMOCK_SERVER +queue_system_environment:TEXTTEST_PICKLE_PROTOCOL diff --git a/QueueSystems/testsuite.texttest.nomad b/QueueSystems/testsuite.texttest.nomad new file mode 100644 index 000000000..d8066956f --- /dev/null +++ b/QueueSystems/testsuite.texttest.nomad @@ -0,0 +1,4 @@ +NormalOperation + +# Various error conditions +ErrorHandling diff --git a/capturemockrc.texttest.nomad b/capturemockrc.texttest.nomad new file mode 100644 index 000000000..b45252c1f --- /dev/null +++ b/capturemockrc.texttest.nomad @@ -0,0 +1,8 @@ +# Nomad is driven via its HTTP API. CaptureMock's own HTTP mode can't be used, as the +# queue system tests need the classic server for the traffic between master and slaves, +# so intercept TextTest's Nomad API module instead. Nomad job IDs contain a random run ID. +[python] +intercepts = texttestlib.queuesystem.nomadapi,secrets.token_hex + +[command line] +intercepts = time diff --git a/config.texttest b/config.texttest index 6b2911af3..ac2621de3 100644 --- a/config.texttest +++ b/config.texttest @@ -29,6 +29,7 @@ extra_version:lsf #extra_version:lsf.signals #extra_version:lsf.gui extra_version:condor +extra_version:nomad extra_version:ec2cloud #extra_version:ec2cloud.gui extra_version:localqs diff --git a/config.texttest.nomad b/config.texttest.nomad new file mode 100644 index 000000000..fca8c54a8 --- /dev/null +++ b/config.texttest.nomad @@ -0,0 +1,13 @@ +base_version:queuesystem + +[run_dependent_text] +# The TextTest program in the Nomad job specifications sent by the master +pythonmocks:'command': '[^']*'{REPLACE 'command': ''} +# Recorded on Windows: make the rest of the paths in the job specifications comparable elsewhere +pythonmocks:\\\\{REPLACE /} +# Recorded on Windows, where slave tasks get no 'User': drop it where they do, and the end of the line before it that differs as a result +pythonmocks:^ 'User': '[^']*' +pythonmocks:^( 'Resources': \{'CPU': [0-9]+\})[,}].*{REPLACE \1} +# Attributes Python's import machinery looks up when CaptureMock intercepts the module, may vary between versions +pythonmocks:^<-PYT:texttestlib\.queuesystem\.nomadapi\.__[a-z]*__{LINES 2} +[end] diff --git a/environment.texttest.nomad b/environment.texttest.nomad new file mode 100644 index 000000000..ad73514fe --- /dev/null +++ b/environment.texttest.nomad @@ -0,0 +1,7 @@ +# Don't let this affect tests unnecessarily +# Negative number disables it +TEXTTEST_QS_POLL_WAIT:-1 + +# The master passes its home directory to Nomad slaves (-home): make it the same everywhere +HOME:$TEXTTEST_SANDBOX +USERPROFILE:$TEXTTEST_SANDBOX