Skip to content

Commit

Permalink
remove logging from tests, use at least 4 threads
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueBurger committed Oct 14, 2023
1 parent 74904f2 commit 654160a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Server/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default new class Logger {
this.setupWriteStream();
}
async setupWriteStream() {
if(process.env.SKIP_BURGERPANEL_LOGFILE) return;
let location = await this.getLogLocation();
if(!location) return;
this.writeStream = fs.createWriteStream(location);
Expand Down
3 changes: 2 additions & 1 deletion Server/test/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export default new class TestUtil {
cwd: path.join(__dirname, "..", "_build"),
env: {
PORT: this.port.toString(),
DB: `json:${this.getDataPath()}`
DB: `json:${this.getDataPath()}`,
SKIP_BURGERPANEL_LOGFILE: "1"
}
});
fs.writeFileSync(path.join(__dirname, "..", "test-context", this.port.toString(), "pid.txt"), (newProcess.pid ?? -1).toString());
Expand Down
3 changes: 2 additions & 1 deletion Server/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
setupFiles: ["test/setup.ts"]
setupFiles: ["test/setup.ts"],
minThreads: 4
},
})

0 comments on commit 654160a

Please sign in to comment.