Skip to content

Commit e965fc0

Browse files
authored
Merge pull request #187 from ThePrez/fix/servertraceoverflow
fix: server trace entries overflowing
2 parents 8df50db + 451bb43 commit e965fc0

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/connection/SCVersion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
export const SERVER_VERSION_TAG = `v1.4.5`;
3-
export const SERVER_VERSION_FILE = `codeforiserver-1.4.5.jar`;
2+
export const SERVER_VERSION_TAG = `v1.4.6`;
3+
export const SERVER_VERSION_FILE = `codeforiserver-1.4.6.jar`;

src/testing/jobs.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,5 +418,25 @@ export const JobsSuite: TestSuite = {
418418
console.log(`Old query method took ${oe - os} milliseconds.`);
419419
assert.equal((ne - ns) < (oe - os), true);
420420
}},
421+
{name: `(long-running) Server-side in-memory tracing doesn't overflow`, test: async () => {
422+
assert.strictEqual(ServerComponent.isInstalled(), true);
423+
424+
const instance = getInstance();
425+
const content = instance.getContent();
426+
427+
const newJob = new SQLJob({naming: `sql`});
428+
await newJob.connect();
429+
await newJob.setTraceConfig(ServerTraceDest.IN_MEM, ServerTraceLevel.DATASTREAM);
430+
431+
let numIterations = 1000;
432+
for (let i = 0; i < numIterations; i++) {
433+
let version = await newJob.getVersion();
434+
if(0 == i%20) {
435+
console.log(`long-running test interation ${i}/${numIterations}`);
436+
}
437+
}
438+
let bruh = await newJob.getTraceData();
439+
newJob.close();
440+
}},
421441
]
422442
}

0 commit comments

Comments
 (0)