Skip to content

Commit a965405

Browse files
committed
优化测试
1 parent 26c88b8 commit a965405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+156
-156
lines changed

test/common/iServer/BufferAnalystServiceSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('testBufferAnalystService_processAsync', function () {
6464
dsBufferAnalystParameters.destroy();
6565
done();
6666
}
67-
}, 6000)
67+
}, 1000)
6868
});
6969

7070
it('byGeometry_NotReturnContent', function (done) {
@@ -108,7 +108,7 @@ describe('testBufferAnalystService_processAsync', function () {
108108
geometryBufferAnalystParameters.destroy();
109109
done();
110110
}
111-
}, 6000)
111+
}, 1000)
112112
});
113113

114114
//测试失败事件
@@ -156,7 +156,7 @@ describe('testBufferAnalystService_processAsync', function () {
156156
dsBufferAnalystParameters.destroy();
157157
done();
158158
}
159-
}, 6000)
159+
}, 1000)
160160
});
161161
});
162162

test/common/iServer/BurstPipelineAnalystServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe('testBurstPipelineAnalystService_processAsync',function(){
8282
burstPipelineAnalystService.destroy();
8383
done();
8484
}
85-
},6000);
85+
},1000);
8686
});
8787

8888
//正确返回结果
@@ -114,6 +114,6 @@ describe('testBurstPipelineAnalystService_processAsync',function(){
114114
burstPipelineAnalystParams.destroy();
115115
done();
116116
}
117-
},6000)
117+
},1000)
118118
});
119119
});

test/common/iServer/ComputeWeightMatrixServiceSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('testComputeWeightMatrixService_processAsync',function(){
7878
parameter.destroy();
7979
done();
8080
}
81-
},8000);
81+
},1500);
8282
});
8383

8484
//id为空
@@ -122,7 +122,7 @@ describe('testComputeWeightMatrixService_processAsync',function(){
122122
parameter.destroy();
123123
done();
124124
}
125-
},6000)
125+
},1000)
126126
});
127127

128128
//参数错误
@@ -166,7 +166,7 @@ describe('testComputeWeightMatrixService_processAsync',function(){
166166
parameter.destroy();
167167
done();
168168
}
169-
},8000)
169+
},1500)
170170
});
171171

172172
//测试参数为空时的健壮性
@@ -186,7 +186,7 @@ describe('testComputeWeightMatrixService_processAsync',function(){
186186
computeWeightMatrixService.destroy();
187187
done();
188188
}
189-
},6000)
189+
},1000)
190190
});
191191

192192
it('isAnalyzeByIdInvalid',function(done){
@@ -229,6 +229,6 @@ describe('testComputeWeightMatrixService_processAsync',function(){
229229
parameter.destroy();
230230
done();
231231
}
232-
},6000)
232+
},1000)
233233
})
234234
});

test/common/iServer/EditFeaturesServiceSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe('testEditFeaturesService_processAsync', function () {
108108
editFeatureParameter.destroy();
109109
done();
110110
}
111-
},6000)
111+
},1000)
112112
});
113113

114114
//测试新增要素 returnContent = false
@@ -158,7 +158,7 @@ describe('testEditFeaturesService_processAsync', function () {
158158
editFeatureParameter.destroy();
159159
done();
160160
}
161-
},6000);
161+
},1000);
162162
});
163163

164164
it('addFeatures_noParameters',function(done) {
@@ -185,7 +185,7 @@ describe('testEditFeaturesService_processAsync', function () {
185185
editFeatureParameter.destroy();
186186
done();
187187
}
188-
}, 6000);
188+
}, 1000);
189189
});
190190

191191
//测试编辑要素
@@ -239,7 +239,7 @@ describe('testEditFeaturesService_processAsync', function () {
239239
editFeatureParameter.destroy();
240240
done();
241241
}
242-
},6000);
242+
},1000);
243243
});
244244

245245
/* //测试删除要素
@@ -279,6 +279,6 @@ describe('testEditFeaturesService_processAsync', function () {
279279
editFeatureParameter.destroy();
280280
done();
281281
}
282-
},6000);
282+
},1000);
283283
})*/
284284
});

test/common/iServer/FieldStatisticServiceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('testFieldStatisticService_processAsync', function () {
5959
fieldStatisticService.destroy();
6060
done();
6161
}
62-
},6000);
62+
},1000);
6363
});
6464

6565
//错误数据集,查询错误
@@ -85,6 +85,6 @@ describe('testFieldStatisticService_processAsync', function () {
8585
fieldStatisticService.destroy();
8686
done();
8787
}
88-
},6000);
88+
},1000);
8989
})
9090
});

test/common/iServer/FindClosestFacilitiesServiceSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('testFindClosestFacilitiesService_processAsync', function () {
7676
parameter.destroy();
7777
done();
7878
}
79-
}, 6000);
79+
}, 1000);
8080
});
8181

8282
// isAnalyzeById
@@ -118,7 +118,7 @@ describe('testFindClosestFacilitiesService_processAsync', function () {
118118
facilitiesParams.destroy();
119119
done();
120120
}
121-
}, 6000)
121+
}, 1000)
122122
});
123123

124124
//参数为空
@@ -156,7 +156,7 @@ describe('testFindClosestFacilitiesService_processAsync', function () {
156156
closestFacilitiesService.destroy();
157157
done();
158158
}
159-
}, 6000);
159+
}, 1000);
160160
});
161161

162162
it('failedEvent', function (done) {
@@ -199,7 +199,7 @@ describe('testFindClosestFacilitiesService_processAsync', function () {
199199
facilitiesParams.destroy();
200200
done();
201201
}
202-
}, 6000)
202+
}, 1000)
203203
})
204204
});
205205

test/common/iServer/FindLocationServiceSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('testFindLocationService_processAsync', function () {
103103
parameter.destroy();
104104
done();
105105
}
106-
}, 6000);
106+
}, 1000);
107107
});
108108

109109
//isFromCenter为true的情况
@@ -181,7 +181,7 @@ describe('testFindLocationService_processAsync', function () {
181181
parameter.destroy();
182182
done();
183183
}
184-
}, 6000)
184+
}, 1000)
185185
});
186186

187187
//参数错误
@@ -233,7 +233,7 @@ describe('testFindLocationService_processAsync', function () {
233233
parameter.destroy();
234234
done();
235235
}
236-
}, 6000)
236+
}, 1000)
237237
});
238238

239239
//参数为空

test/common/iServer/FindMTSPPathsServiceSpec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('testFindMTSPPathsService_processAsync', function () {
3838
var centerArray = [new SuperMap.Geometry.Point(3000, -3000), new SuperMap.Geometry.Point(3500, -2000)],
3939
nodeArray = [new SuperMap.Geometry.Point(5600, -3600),
4040
new SuperMap.Geometry.Point(5000, -4600),
41-
new SuperMap.Geometry.Point(6000, -4600)
41+
new SuperMap.Geometry.Point(1000, -4600)
4242
];
4343
var resultSetting = new SuperMap.TransportationAnalystResultSetting({
4444
returnEdgeFeatures: true,
@@ -91,15 +91,15 @@ describe('testFindMTSPPathsService_processAsync', function () {
9191
parameter.destroy();
9292
done();
9393
}
94-
}, 6000)
94+
}, 1000)
9595
});
9696

9797
//测试hasLeastTotalCost为true
9898
it('hasLeastTotalCost:true', function (done) {
9999
var centerArray = [new SuperMap.Geometry.Point(3000, -3000), new SuperMap.Geometry.Point(3500, -2000)];
100100
var nodeArray = [new SuperMap.Geometry.Point(5600, -3600),
101101
new SuperMap.Geometry.Point(5000, -4600),
102-
new SuperMap.Geometry.Point(6000, -4600)
102+
new SuperMap.Geometry.Point(1000, -4600)
103103
];
104104
var resultSetting = new SuperMap.TransportationAnalystResultSetting({
105105
returnEdgeFeatures: true,
@@ -152,7 +152,7 @@ describe('testFindMTSPPathsService_processAsync', function () {
152152
parameter.destroy();
153153
done();
154154
}
155-
}, 6000);
155+
}, 1000);
156156
});
157157

158158
//测试传入参数为id
@@ -211,15 +211,15 @@ describe('testFindMTSPPathsService_processAsync', function () {
211211
parameter.destroy();
212212
done();
213213
}
214-
}, 6000)
214+
}, 1000)
215215
});
216216

217217
//测试传入参数为id,但是传入为空
218218
it('isAnalyzeById but null', function (done) {
219219
var centerArray = [new SuperMap.Geometry.Point(3000, -3000), new SuperMap.Geometry.Point(3500, -2000)];
220220
var nodeArray = [new SuperMap.Geometry.Point(5600, -3600),
221221
new SuperMap.Geometry.Point(5000, -4600),
222-
new SuperMap.Geometry.Point(6000, -4600)
222+
new SuperMap.Geometry.Point(1000, -4600)
223223
];
224224
var resultSetting = new SuperMap.TransportationAnalystResultSetting({
225225
returnEdgeFeatures: true,
@@ -262,15 +262,15 @@ describe('testFindMTSPPathsService_processAsync', function () {
262262
parameter.destroy();
263263
done();
264264
}
265-
}, 6000)
265+
}, 1000)
266266
});
267267

268268
//参数错误
269269
it('parameterWrong', function (done) {
270270
var centerArray = [new SuperMap.Geometry.Point(3000, -3000), new SuperMap.Geometry.Point(3500, -2000)];
271271
var nodeArray = [new SuperMap.Geometry.Point(5600, -3600),
272272
new SuperMap.Geometry.Point(5000, -4600),
273-
new SuperMap.Geometry.Point(6000, -4600)
273+
new SuperMap.Geometry.Point(1000, -4600)
274274
];
275275
var resultSetting = new SuperMap.TransportationAnalystResultSetting({
276276
returnEdgeFeatures: true,
@@ -313,7 +313,7 @@ describe('testFindMTSPPathsService_processAsync', function () {
313313
parameter.destroy();
314314
done();
315315
}
316-
}, 6000)
316+
}, 1000)
317317
});
318318

319319
//参数为空
@@ -334,15 +334,15 @@ describe('testFindMTSPPathsService_processAsync', function () {
334334
findMTSPPathsService.destroy();
335335
done();
336336
}
337-
}, 6000)
337+
}, 1000)
338338
});
339339

340340
//错误的isAnalyzeById
341341
it('AnalyzeById_null', function (done) {
342342
var centerArray = [new SuperMap.Geometry.Point(3000, -3000), new SuperMap.Geometry.Point(3500, -2000)],
343343
nodeArray = [new SuperMap.Geometry.Point(5600, -3600),
344344
new SuperMap.Geometry.Point(5000, -4600),
345-
new SuperMap.Geometry.Point(6000, -4600)
345+
new SuperMap.Geometry.Point(1000, -4600)
346346
];
347347
var resultSetting = new SuperMap.TransportationAnalystResultSetting({
348348
returnEdgeFeatures: true,
@@ -384,7 +384,7 @@ describe('testFindMTSPPathsService_processAsync', function () {
384384
parameter.destroy();
385385
done();
386386
}
387-
}, 6000)
387+
}, 1000)
388388
})
389389
});
390390

test/common/iServer/FindPathServiceSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('testFindPathService_processAsync', function () {
8787
parameter.destroy();
8888
done();
8989
}
90-
}, 6000);
90+
}, 1000);
9191
});
9292

9393
//设置返回信息的有效性
@@ -139,7 +139,7 @@ describe('testFindPathService_processAsync', function () {
139139
parameter.destroy();
140140
done();
141141
}
142-
}, 6000)
142+
}, 1000)
143143
});
144144

145145
//id为空
@@ -186,7 +186,7 @@ describe('testFindPathService_processAsync', function () {
186186
parameter.destroy();
187187
done();
188188
}
189-
}, 6000)
189+
}, 1000)
190190
});
191191

192192
//参数错误
@@ -233,7 +233,7 @@ describe('testFindPathService_processAsync', function () {
233233
parameter.destroy();
234234
done();
235235
}
236-
}, 6000)
236+
}, 1000)
237237
});
238238

239239
//参数为空
@@ -255,7 +255,7 @@ describe('testFindPathService_processAsync', function () {
255255
findPathService.destroy();
256256
done();
257257
}
258-
}, 6000)
258+
}, 1000)
259259
});
260260

261261
//AnalyzeById_null
@@ -302,7 +302,7 @@ describe('testFindPathService_processAsync', function () {
302302
parameter.destroy();
303303
done();
304304
}
305-
}, 6000)
305+
}, 1000)
306306
});
307307
});
308308

0 commit comments

Comments
 (0)