@@ -118,7 +118,7 @@ function rubyTests (options, ssl) {
118
118
119
119
let continueTesting = true ;
120
120
let filtered = { } ;
121
- let result = { } ;
121
+ let results = { } ;
122
122
123
123
let args ;
124
124
let command ;
@@ -158,6 +158,7 @@ function rubyTests (options, ssl) {
158
158
} ;
159
159
160
160
let count = 0 ;
161
+ let graphCount = 0 ;
161
162
files = tu . splitBuckets ( options , files ) ;
162
163
163
164
for ( let i = 0 ; i < files . length ; i ++ ) {
@@ -170,7 +171,7 @@ function rubyTests (options, ssl) {
170
171
if ( ! continueTesting ) {
171
172
print ( 'Skipping ' + te + ' server is gone.' ) ;
172
173
173
- result [ te ] = {
174
+ results [ te ] = {
174
175
status : false ,
175
176
message : instanceInfo . exitStatus
176
177
} ;
@@ -203,7 +204,7 @@ function rubyTests (options, ssl) {
203
204
print ( '\n' + Date ( ) + ' rspec trying' , tfn , '...' ) ;
204
205
const res = pu . executeAndWait ( command , args , options , 'arangosh' , instanceInfo . rootDir ) ;
205
206
206
- result [ te ] = {
207
+ results [ te ] = {
207
208
total : 0 ,
208
209
failed : 0 ,
209
210
status : res . status
@@ -217,15 +218,15 @@ function rubyTests (options, ssl) {
217
218
}
218
219
219
220
for ( let j = 0 ; j < jsonResult . examples . length ; ++ j ) {
220
- result [ te ] . failed += parseRspecJson (
221
- jsonResult . examples [ j ] , result [ te ] ,
221
+ results [ te ] . failed += parseRspecJson (
222
+ jsonResult . examples [ j ] , results [ te ] ,
222
223
jsonResult . summary . duration ) ;
223
224
}
224
225
225
- result [ te ] . duration = jsonResult . summary . duration ;
226
+ results [ te ] . duration = jsonResult . summary . duration ;
226
227
} catch ( x ) {
227
228
print ( 'Failed to parse rspec result: ' + x ) ;
228
- result [ te ] [ 'complete_' + te ] = res ;
229
+ results [ te ] [ 'complete_' + te ] = res ;
229
230
230
231
if ( res . status === false ) {
231
232
options . cleanup = false ;
@@ -247,15 +248,26 @@ function rubyTests (options, ssl) {
247
248
return ( name [ 0 ] !== '_' ) ; // exclude system collections from the comparison
248
249
} ) ;
249
250
if ( delta . length !== 0 ) {
250
- result [ te ] = {
251
+ results [ te ] = {
251
252
status : false ,
252
- message : 'Cleanup missing - test left over collections: ' + delta + '. Original test status: ' + JSON . stringify ( result [ te ] )
253
+ message : 'Cleanup missing - test left over collections! [ ' + delta + '] - Original test status: ' + JSON . stringify ( results [ te ] )
253
254
} ;
254
255
collectionsBefore = [ ] ;
255
256
db . _collections ( ) . forEach ( collection => {
256
257
collectionsBefore . push ( collection . _name ) ;
257
258
} ) ;
258
259
}
260
+
261
+ if ( db . _graphs . count ( ) !== graphCount ) {
262
+ results [ te ] = {
263
+ status : false ,
264
+ message : 'Cleanup of graphs missing - found graph definitions: [ ' +
265
+ JSON . stringify ( db . _graphs . toArray ( ) ) +
266
+ ' ] - Original test status: ' +
267
+ JSON . stringify ( results [ te ] )
268
+ } ;
269
+ graphCount = db . _graphs . count ( ) ;
270
+ }
259
271
}
260
272
} else {
261
273
if ( options . extremeVerbosity ) {
@@ -268,19 +280,19 @@ function rubyTests (options, ssl) {
268
280
print ( 'Shutting down...' ) ;
269
281
270
282
if ( count === 0 ) {
271
- result [ 'ALLTESTS' ] = {
283
+ results [ 'ALLTESTS' ] = {
272
284
status : false ,
273
285
skipped : true
274
286
} ;
275
- result . status = false ;
287
+ results . status = false ;
276
288
print ( RED + 'No testcase matched the filter.' + RESET ) ;
277
289
}
278
290
279
291
fs . remove ( tmpname ) ;
280
292
pu . shutdownInstance ( instanceInfo , options ) ;
281
293
print ( 'done.' ) ;
282
294
283
- return result ;
295
+ return results ;
284
296
}
285
297
286
298
// //////////////////////////////////////////////////////////////////////////////
0 commit comments