Skip to content

Commit 472cf69

Browse files
committed
rm analysis log, fix test case
1 parent ff15ba3 commit 472cf69

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

packages/core/test/analyzer.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ describe('Performance Analysis', () => {
2323
fs.unlinkSync('performanceRecord.txt');
2424
}
2525
});
26+
afterEach(() => {
27+
PerformanceAnalysis.clean();
28+
if (fs.existsSync('performanceRecord.txt')) {
29+
fs.unlinkSync('performanceRecord.txt');
30+
}
31+
});
2632
it('should collect performance data', async () => {
2733
await collect('waitOneSec');
2834
expect(PerformanceAnalysis.count()).toBeTruthy();
@@ -37,6 +43,6 @@ describe('Performance Analysis', () => {
3743
// expect file have two lines
3844
const data = fs.readFileSync('performanceRecord.txt', 'utf8');
3945
const lines = data.split('\n').filter((line) => line !== '');
40-
expect(lines.length).toBe(4);
46+
expect(lines.length).toBe(6);
4147
});
4248
});

packages/serve/src/lib/server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
ConfigurationError,
1515
VulcanError,
1616
ICacheLayerRefresher,
17-
getAnalysis,
1817
} from '@vulcan-sql/core';
1918
import { Container, TYPES } from '../containers';
2019
import { ServeConfig, sslFileOptions } from '../models';
@@ -129,7 +128,6 @@ export class VulcanServer {
129128
}
130129
this.cacheRefresher?.stop();
131130
this.container.unload();
132-
getAnalysis();
133131
}
134132

135133
/**

0 commit comments

Comments
 (0)