@@ -252,13 +252,18 @@ mod tests {
252
252
// Milliseconds in json may not be exactly the same as the one we get because of the test duration.
253
253
// We need to have a difference not more than 49ms to keep the same 1 first milliseconds digits.
254
254
let delta = 49 ;
255
+ // TODO: to remove, it-s just to investigation on CI.
256
+ let error_message = format ! (
257
+ "\n - milliseconds_left:{milliseconds_left}\n - milliseconds_elapsed:{milliseconds_elapsed}\n - json_string:{json_string}"
258
+ ) ;
255
259
256
260
assert ! (
257
261
( ( expected_milliseconds_left - delta) ..=( expected_milliseconds_left + delta) )
258
262
. contains( & milliseconds_left) ,
259
- "milliseconds_left should be close to {} but it's {}" ,
263
+ "milliseconds_left should be close to {} but it's {}. {} " ,
260
264
& expected_milliseconds_left,
261
- & milliseconds_left
265
+ & milliseconds_left,
266
+ & error_message
262
267
) ;
263
268
assert ! (
264
269
json_string. contains( r#""seconds_left": 0.4"# ) , // Should be close to 0.450
@@ -269,9 +274,10 @@ mod tests {
269
274
assert ! (
270
275
( ( expected_milliseconds_elapsed - delta) ..=( expected_milliseconds_elapsed + delta) )
271
276
. contains( & milliseconds_elapsed) ,
272
- "milliseconds_elapsed should be close to {} but it's {}" ,
277
+ "milliseconds_elapsed should be close to {} but it's {}. {} " ,
273
278
& expected_milliseconds_elapsed,
274
- & milliseconds_elapsed
279
+ & milliseconds_elapsed,
280
+ & error_message
275
281
) ;
276
282
assert ! (
277
283
json_string. contains( r#""seconds_elapsed": 0.1"# ) , // Should be close to 0.150
0 commit comments