13078: Ignore held jobs with priority=0 (e.g., SLURM 15.x).
[arvados.git] / services / crunch-dispatch-slurm / squeue_test.go
index 694a4d6f36c1da35ce830edf708a8c3df56bd7b5..11f7c482b9ac2754ad66d05fed12bc0fd471aa5b 100644 (file)
@@ -46,6 +46,12 @@ func (s *SqueueSuite) TestReniceAll(c *C) {
                        want:   map[string]int64{uuids[0]: 999, uuids[1]: 1},
                        expect: [][]string{{uuids[0], "0"}, {uuids[1], "112"}},
                },
+               { // ignore fake2 because slurm priority=0
+                       spread: 1,
+                       squeue: uuids[0] + " 10000 4294000000\n" + uuids[1] + " 10000 4294000111\n" + uuids[2] + " 10000 0\n",
+                       want:   map[string]int64{uuids[0]: 999, uuids[1]: 1, uuids[2]: 997},
+                       expect: [][]string{{uuids[0], "0"}, {uuids[1], "112"}},
+               },
        } {
                c.Logf("spread=%d squeue=%q want=%v -> expect=%v", test.spread, test.squeue, test.want, test.expect)
                slurm := &slurmFake{