14 Commits

Author SHA1 Message Date
Daniel Bennett
f47cb5d10f e2e: adjust flaky timings (#26771)
hopefully fixes:

```
TestOversubscription/testExec:
    oversubscription_test.go:57: submitting job: "./input/exec.hcl"
    oversubscription_test.go:72:
        oversubscription_test.go:72: expected condition to pass within wait context
        ↪ error: wait: timeout exceeded: expect '31457280' in stdout, got: 'stat {...}/cat.stdout.0: no such file or directory'
```

and in separate runs,

```
TestTaskAPI/testTaskAPI_Auth:
     taskapi_test.go:85:
         taskapi_test.go:85: expected string to have suffix
         ↪ suffix: Unauthorized
         ↪ string:
```

```
TestTaskAPI/testTaskAPI_Auth:
     taskapi_test.go:85:
         taskapi_test.go:85: expected string to have suffix
         ↪ suffix: Forbidden
         ↪ string:
```
2025-09-15 15:54:53 -04:00
Seth Hoenig
a58f0eca8e e2e: move rawexec oversub tests into oversubscription e2e test suite (#19717)
* e2e: move rawexec oversub tests into oversubscription e2e test suite

This PR moves two tests for raw_exec and memory oversubscription into
the oversubscription test suite, which has the necessary plumbing to
activate and restore the oversubscription configuration of the scheduler
during the test.

* cr: rename files for better readability
2024-01-11 14:27:05 -06:00
Daniel Bennett
e9ff6d74d3 e2e: unflake oversubscription.testExec (#19373)
poll with must.Wait() instead of hard-coded sleep
waiting for poststart task to run, and wait for longer
2023-12-08 10:20:18 -06:00
Seth Hoenig
5987ba434f e2ev3: wait for logs to become ready (#19067)
Just because an alloc is running does not mean nomad is ready to serve
task logs. In a test case where you immediatly read logs after starting
a task, it could be that nomad responds with "no logs found" when you
try to read logs, in which case you just need to wait longer. Do so in
the v3 TaskLogs helper function.
2023-11-10 12:43:16 -06:00
Seth Hoenig
c17333d74a e2e refactor oversubscription (#19060)
* e2e: remove old oversubscription test

* e2e: fixup and cleanup oversubscription test suite

Fix and cleanup this old oversubscription test.

* use t.Cleanup instead of defer in tests
2023-11-10 09:25:32 -06:00
hashicorp-copywrite[bot]
a9d61ea3fd Update copyright file headers to BUSL-1.1 2023-08-10 17:27:29 -05:00
Seth Hoenig
a1ebd075c4 e2e: add e2e tests for job submission api (#16841)
* e2e: add e2e tests for job submission api

* e2e: fixup callers of AllocLogs

* fix typo
2023-04-12 08:36:17 -05:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
Seth Hoenig
2372c6d20c e2e: fixup oversubscription test case for jammy (#15347)
* e2e: fixup oversubscription test case for jammy

jammy uses cgroups v2, need to lookup the max memory limit from the
unified heirarchy format

* e2e: set constraint to require cgroups v2 on oversub docker test
2022-11-21 12:41:55 -06:00
Tim Gross
1c13deec86 E2E: oversubscription assertion needs to wait for stats (#12540)
The oversubscription test expects an output that requires the client
has polled the task for stats at least once. Wait long enough to
ensure that we've polled the stats before failing the test.
2022-04-11 11:40:51 -04:00
Luiz Aoqui
89447fb42e Revert "Return SchedulerConfig instead of SchedulerConfigResponse struct (#10799)" (#11433) 2021-11-02 17:42:52 -04:00
Charlie Voiselle
8ba714e211 Return SchedulerConfig instead of SchedulerConfigResponse struct (#10799) 2021-10-13 21:23:13 -04:00
Mahmood Ali
490f393fb7 e2e: enable memory oversubscription (#10557)
Enable memory oversubscription for the oversubscription tests.
2021-05-10 14:33:47 -04:00
Mahmood Ali
750e665a1d oversubscription: e2e tests! 2021-03-30 16:55:58 -04:00