Skip to content

Commit 4a9317f

Browse files
committed
querysystem进行ci测试隔离
1 parent 9450dd5 commit 4a9317f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/ECS/Core/QuerySystem.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ describe('QuerySystem - 查询系统测试', () => {
405405

406406
describe('查询统计和性能监控', () => {
407407
test('应该能够获取查询统计信息', () => {
408+
querySystem.clearCache(); // 确保测试隔离
408409
entities[0].addComponent(new PositionComponent(10, 20));
409410
entities[1].addComponent(new VelocityComponent(1, 1));
410411

@@ -460,6 +461,7 @@ describe('QuerySystem - 查询系统测试', () => {
460461

461462
describe('内存管理和优化', () => {
462463
test('大量查询不应该导致内存泄漏', () => {
464+
querySystem.clearCache(); // 确保测试隔离
463465
const entityCount = 1000;
464466
const testEntities: Entity[] = [];
465467

0 commit comments

Comments
 (0)