Yet another commit trying to fix CI timeouts

This commit is contained in:
Radon Rosborough 2020-08-23 13:31:50 -06:00
parent 72c99b00c6
commit dd67746972
3 changed files with 5 additions and 4 deletions

View File

@ -68,4 +68,4 @@ RUN sudo cp -a /tmp/riju/* /home/docker/src/ && rm -rf /tmp/riju
WORKDIR /home/docker/src
RUN sudo deluser docker sudo
RUN RIJU_PRIVILEGED=1 CONCURRENCY=1 TIMEOUT_SECS=30 yarn test
RUN RIJU_PRIVILEGED=1 CONCURRENCY=1 TIMEOUT_FACTOR=5 yarn test

View File

@ -63,7 +63,7 @@ additional layers. You can build it as follows:
Lastly I should mention the tests. There are integration tests for
every language, and they can be run as follows:
$ [CONCURRENCY=2] [TIMEOUT=5] yarn test [<filter>...]
$ [CONCURRENCY=2] [TIMEOUT_FACTOR=1] yarn test [<filter>...]
Filters can be for language (`python`, `java`) or test type (`hello`,
`lsp`). You can comma-delimit multiple filters to do a disjunction,

View File

@ -15,8 +15,9 @@ function parseIntOr(thing: any, def: number) {
return Number.isNaN(num) ? def : num;
}
const TIMEOUT_SECS = parseIntOr(process.env.TIMEOUT_SECS, 5);
const TIMEOUT_FACTOR = parseIntOr(process.env.TIMEOUT_FACTOR, 1);
const CONCURRENCY = parseIntOr(process.env.CONCURRENCY, 2);
const BASE_TIMEOUT_SECS = 5;
function findPosition(str: string, idx: number) {
const lines = str.substring(0, idx).split("\n");
@ -103,7 +104,7 @@ class Test {
timeout = setTimeout(() => {
this.timedOut = true;
this.handleUpdate();
}, (this.config.timeout || TIMEOUT_SECS) * 1000);
}, (this.config.timeout || BASE_TIMEOUT_SECS) * 1000 * TIMEOUT_FACTOR);
await session.setup();
switch (this.type) {
case "ensure":