Skip to content

Commit 006404a

Browse files
committed
【fix】优化UT
1 parent 7bd14e8 commit 006404a

15 files changed

+53
-56
lines changed

test/classic/overlay/MapVLayerSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ describe('classic_MapVLayer', () => {
174174
expect(data).not.toBeNull();
175175
expect(data.length).toBe(0);
176176
done();
177-
}, 2000);
177+
}, 0);
178178
});
179179

180180

test/classic/services/AddressMatchServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('classic_AddressMatchService', () => {
8686
expect(false).toBeTruthy();
8787
done();
8888
}
89-
}, 5000);
89+
}, 0);
9090
});
9191

9292
it('decode', (done) => {
@@ -136,6 +136,6 @@ describe('classic_AddressMatchService', () => {
136136
expect(false).toBeTruthy();
137137
done();
138138
}
139-
}, 5000);
139+
}, 0);
140140
});
141141
});

test/common/iServer/BurstPipelineAnalystServiceSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('BurstPipelineAnalystService', () => {
7474
expect(serviceFailedEventArgsSystem).toBeNull();
7575
burstPipelineAnalystService.destroy();
7676
done();
77-
}, 1000);
77+
}, 0);
7878
});
7979

8080
//正确返回结果

test/common/iServer/EditFeaturesServiceSpec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ describe('EditFeaturesService', () => {
150150
return Promise.resolve(new Response(`{"succeed":true}`));
151151
});
152152
updateFeaturesService.processAsync(updateFeaturesParams);
153-
setTimeout(() => {
154-
155-
}, 2000);
156153
});
157154

158155
// 删除要素

test/common/iServer/GetGridCellInfosServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('GetGridCellInfosService', () => {
113113
queryParam.destroy();
114114
done();
115115
}
116-
}, 2000);
116+
}, 0);
117117
});
118118

119119
it('fail:processAsync', done => {
@@ -144,7 +144,7 @@ describe('GetGridCellInfosService', () => {
144144
myService.destroy();
145145
done();
146146
}
147-
}, 2000);
147+
}, 0);
148148
});
149149

150150
it('getDatasetInfoCompleted', () => {

test/common/iServer/ThemeServiceSpec.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('ThemeService', () => {
161161
themeParameters.destroy();
162162
done();
163163
}
164-
}, 4000);
164+
}, 0);
165165
});
166166

167167
it('processAsync_Range_1', (done) => {
@@ -237,7 +237,7 @@ describe('ThemeService', () => {
237237
themeParameters.destroy();
238238
done();
239239
}
240-
}, 2000);
240+
}, 0);
241241
});
242242

243243
it('processAsync_Range_UrlLarge', (done) => {
@@ -359,7 +359,7 @@ describe('ThemeService', () => {
359359
themeParameters.destroy();
360360
done();
361361
}
362-
}, 2000);
362+
}, 0);
363363
});
364364

365365
it('processAsync_Graph', (done) => {
@@ -431,7 +431,7 @@ describe('ThemeService', () => {
431431
themeParameters.destroy();
432432
done();
433433
}
434-
}, 2000);
434+
}, 0);
435435
});
436436

437437
it('processAsync_JoinItem', (done) => {
@@ -527,7 +527,7 @@ describe('ThemeService', () => {
527527
themeParameters.destroy();
528528
done();
529529
}
530-
}, 2000);
530+
}, 0);
531531
});
532532

533533
it('processAsync_Unique', (done) => {
@@ -615,7 +615,7 @@ describe('ThemeService', () => {
615615
themeParameters.destroy();
616616
done();
617617
}
618-
}, 2000);
618+
}, 0);
619619
});
620620

621621
it('processAsync_Unique_0', (done) => {
@@ -711,7 +711,7 @@ describe('ThemeService', () => {
711711
themeParameters.destroy();
712712
done();
713713
}
714-
}, 2000);
714+
}, 0);
715715
});
716716

717717
//统一风格标签专题图
@@ -780,7 +780,7 @@ describe('ThemeService', () => {
780780
themeParameters.destroy();
781781
done();
782782
}
783-
}, 2000);
783+
}, 0);
784784
});
785785

786786
//分段标签专题图
@@ -888,7 +888,7 @@ describe('ThemeService', () => {
888888
themeParameters.destroy();
889889
done();
890890
}
891-
}, 2000);
891+
}, 0);
892892
});
893893

894894
//分段标签专题图
@@ -1024,7 +1024,7 @@ describe('ThemeService', () => {
10241024
themeParameters.destroy();
10251025
done();
10261026
}
1027-
}, 2000);
1027+
}, 0);
10281028
});
10291029

10301030
//矩阵标签专题图
@@ -1101,7 +1101,7 @@ describe('ThemeService', () => {
11011101
themeParameters.destroy();
11021102
done();
11031103
}
1104-
}, 2000);
1104+
}, 0);
11051105
});
11061106

11071107
//使用内存数据制作统一风格标签专题图
@@ -1174,7 +1174,7 @@ describe('ThemeService', () => {
11741174
themeParameters.destroy();
11751175
done();
11761176
}
1177-
}, 2000);
1177+
}, 0);
11781178
});
11791179

11801180
//使用内存数据制作范围分段专题图
@@ -1263,7 +1263,7 @@ describe('ThemeService', () => {
12631263
themeParameters.destroy();
12641264
done();
12651265
}
1266-
}, 2000);
1266+
}, 0);
12671267
});
12681268

12691269
//点密度专题图
@@ -1321,7 +1321,7 @@ describe('ThemeService', () => {
13211321
themeParameters.destroy();
13221322
done();
13231323
}
1324-
}, 2000);
1324+
}, 0);
13251325
});
13261326

13271327
//等级符号专题图
@@ -1387,7 +1387,7 @@ describe('ThemeService', () => {
13871387
themeParameters.destroy();
13881388
done();
13891389
}
1390-
}, 2000);
1390+
}, 0);
13911391
});
13921392

13931393
it('ThemeUniqueItem', () => {
@@ -1471,7 +1471,7 @@ describe('ThemeService', () => {
14711471
themeParameters.destroy();
14721472
done();
14731473
}
1474-
}, 4000);
1474+
}, 0);
14751475
});
14761476
});
14771477

test/common/iServer/TransferPathServiceSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('TransferPathService', () => {
5151
service.destroy();
5252
done();
5353
}
54-
}, 1500)
54+
}, 0)
5555
});
5656

5757
it('success:processAsync', (done) => {

test/common/iServer/TransferSolutionServiceSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('TransferSolutionService', () => {
5454
service.destroy();
5555
done();
5656
}
57-
}, 1000);
57+
}, 0);
5858
});
5959

6060
it('success:processAsync', (done) => {

test/leaflet/components/clientcomputation/ClientComputationViewSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('leaflet_clientcomputation_ClientComputationView', () => {
144144
console.log("clientcomputation" + exception.name + ":" + exception.message);
145145
done();
146146
}
147-
}, 600)
147+
}, 0)
148148
});
149149

150150

test/leaflet/components/dataflow/DataFlowViewSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ describe('leaflet_dataflow_DataFlowView', () => {
119119
setTimeout(() => {
120120
expect(dataView.viewModel.dataFlowLayer.getLayers).toHaveBeenCalled();
121121
done();
122-
}, 500)
122+
}, 0)
123123
});
124124

125125
it('cancelSubscribe', (done) => {
126126
dataView.viewModel.cancelSubscribe();
127127
setTimeout(() => {
128128
expect(dataView.viewModel.dataFlowLayer).toBeNull();
129129
done();
130-
}, 500)
130+
}, 0)
131131
});
132132

133133
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy