Yet another commit trying to fix CI timeouts
This commit is contained in:
parent
72c99b00c6
commit
dd67746972
|
@ -68,4 +68,4 @@ RUN sudo cp -a /tmp/riju/* /home/docker/src/ && rm -rf /tmp/riju
|
||||||
|
|
||||||
WORKDIR /home/docker/src
|
WORKDIR /home/docker/src
|
||||||
RUN sudo deluser docker sudo
|
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
|
||||||
|
|
|
@ -63,7 +63,7 @@ additional layers. You can build it as follows:
|
||||||
Lastly I should mention the tests. There are integration tests for
|
Lastly I should mention the tests. There are integration tests for
|
||||||
every language, and they can be run as follows:
|
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`,
|
Filters can be for language (`python`, `java`) or test type (`hello`,
|
||||||
`lsp`). You can comma-delimit multiple filters to do a disjunction,
|
`lsp`). You can comma-delimit multiple filters to do a disjunction,
|
||||||
|
|
|
@ -15,8 +15,9 @@ function parseIntOr(thing: any, def: number) {
|
||||||
return Number.isNaN(num) ? def : num;
|
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 CONCURRENCY = parseIntOr(process.env.CONCURRENCY, 2);
|
||||||
|
const BASE_TIMEOUT_SECS = 5;
|
||||||
|
|
||||||
function findPosition(str: string, idx: number) {
|
function findPosition(str: string, idx: number) {
|
||||||
const lines = str.substring(0, idx).split("\n");
|
const lines = str.substring(0, idx).split("\n");
|
||||||
|
@ -103,7 +104,7 @@ class Test {
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
this.timedOut = true;
|
this.timedOut = true;
|
||||||
this.handleUpdate();
|
this.handleUpdate();
|
||||||
}, (this.config.timeout || TIMEOUT_SECS) * 1000);
|
}, (this.config.timeout || BASE_TIMEOUT_SECS) * 1000 * TIMEOUT_FACTOR);
|
||||||
await session.setup();
|
await session.setup();
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case "ensure":
|
case "ensure":
|
||||||
|
|
Loading…
Reference in New Issue