projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12573: Fix tests.
[arvados.git]
/
services
/
crunch-dispatch-slurm
/
crunch-dispatch-slurm_test.go
diff --git
a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
index 052cdfb1b6dab6a5a6f6468d4468be9a6021f275..a823755379574155420e465b2ec2b72f234a3024 100644
(file)
--- a/
services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
+++ b/
services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
@@
-166,7
+166,7
@@
func (s *TestSuite) TestIntegrationNormal(c *C) {
if done {
return exec.Command("true")
} else {
if done {
return exec.Command("true")
} else {
- return exec.Command("echo", "zzzzz-dz642-queuedcontainer 999000")
+ return exec.Command("echo", "zzzzz-dz642-queuedcontainer 9990
1
00")
}
},
nil,
}
},
nil,
@@
-192,7
+192,7
@@
func (s *TestSuite) TestIntegrationCancel(c *C) {
if cmd != nil && cmd.ProcessState != nil {
return exec.Command("true")
} else {
if cmd != nil && cmd.ProcessState != nil {
return exec.Command("true")
} else {
- return exec.Command("echo", "zzzzz-dz642-queuedcontainer 999000")
+ return exec.Command("echo", "zzzzz-dz642-queuedcontainer 9990
1
00")
}
},
func(container arvados.Container) *exec.Cmd {
}
},
func(container arvados.Container) *exec.Cmd {
@@
-230,7
+230,7
@@
func (s *TestSuite) TestIntegrationMissingFromSqueue(c *C) {
fmt.Sprintf("--mem=%d", 11445),
fmt.Sprintf("--cpus-per-task=%d", 4),
fmt.Sprintf("--tmp=%d", 45777),
fmt.Sprintf("--mem=%d", 11445),
fmt.Sprintf("--cpus-per-task=%d", 4),
fmt.Sprintf("--tmp=%d", 45777),
- fmt.Sprintf("--nice=%d", 9990
00
)},
+ fmt.Sprintf("--nice=%d", 9990)},
func(dispatcher *dispatch.Dispatcher, container arvados.Container) {
dispatcher.UpdateState(container.UUID, dispatch.Running)
time.Sleep(3 * time.Second)
func(dispatcher *dispatch.Dispatcher, container arvados.Container) {
dispatcher.UpdateState(container.UUID, dispatch.Running)
time.Sleep(3 * time.Second)
@@
-398,7
+398,7
@@
func testSbatchFuncWithArgs(c *C, args []string) {
var expected []string
expected = append(expected, "sbatch")
expected = append(expected, theConfig.SbatchArguments...)
var expected []string
expected = append(expected, "sbatch")
expected = append(expected, theConfig.SbatchArguments...)
- expected = append(expected, "--job-name=123", "--mem=239", "--cpus-per-task=2", "--tmp=0", "--nice=9990
00
")
+ expected = append(expected, "--job-name=123", "--mem=239", "--cpus-per-task=2", "--tmp=0", "--nice=9990")
c.Check(sbatchCmd.Args, DeepEquals, expected)
}
c.Check(sbatchCmd.Args, DeepEquals, expected)
}
@@
-414,7
+414,7
@@
func (s *MockArvadosServerSuite) TestSbatchPartition(c *C) {
var expected []string
expected = append(expected, "sbatch")
var expected []string
expected = append(expected, "sbatch")
- expected = append(expected, "--job-name=123", "--mem=239", "--cpus-per-task=1", "--tmp=0", "--nice=9990
00
", "--partition=blurb,b2")
+ expected = append(expected, "--job-name=123", "--mem=239", "--cpus-per-task=1", "--tmp=0", "--nice=9990", "--partition=blurb,b2")
c.Check(sbatchCmd.Args, DeepEquals, expected)
}
c.Check(sbatchCmd.Args, DeepEquals, expected)
}
@@
-426,9
+426,9
@@
func (s *TestSuite) TestIntegrationChangePriority(c *C) {
container := s.integrationTest(c,
func() *exec.Cmd {
if step == 0 {
container := s.integrationTest(c,
func() *exec.Cmd {
if step == 0 {
- return exec.Command("echo", "zzzzz-dz642-queuedcontainer 999000")
+ return exec.Command("echo", "zzzzz-dz642-queuedcontainer 9990
1
00")
} else if step == 1 {
} else if step == 1 {
- return exec.Command("echo", "zzzzz-dz642-queuedcontainer 400000")
+ return exec.Command("echo", "zzzzz-dz642-queuedcontainer 4000
1
00")
} else {
return exec.Command("echo")
}
} else {
return exec.Command("echo")
}
@@
-453,5
+453,5
@@
func (s *TestSuite) TestIntegrationChangePriority(c *C) {
dispatcher.UpdateState(container.UUID, dispatch.Complete)
})
c.Check(container.State, Equals, arvados.ContainerStateComplete)
dispatcher.UpdateState(container.UUID, dispatch.Complete)
})
c.Check(container.State, Equals, arvados.ContainerStateComplete)
- c.Check(scontrolCmdLine, DeepEquals, []string{"scontrol", "update", "JobName=zzzzz-dz642-queuedcontainer", "
--nice=400
000"})
+ c.Check(scontrolCmdLine, DeepEquals, []string{"scontrol", "update", "JobName=zzzzz-dz642-queuedcontainer", "
Nice=4
000"})
}
}