Browse Source

test(neon,nextcloud): Fix flaky tests

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/565/head
jld3103 1 year ago
parent
commit
37822d0dcd
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/test/timer_bloc_test.dart
  2. 2
      packages/nextcloud/test/webdav_test.dart

2
packages/neon/neon/test/timer_bloc_test.dart

@ -16,7 +16,7 @@ void main() {
await Future.delayed(duration); await Future.delayed(duration);
expect(stopwatch.elapsedMilliseconds, greaterThan(duration.inMilliseconds)); expect(stopwatch.elapsedMilliseconds, greaterThan(duration.inMilliseconds));
expect(stopwatch.elapsedMilliseconds, lessThan(duration.inMilliseconds * 1.1)); expect(stopwatch.elapsedMilliseconds, lessThan(duration.inMilliseconds * 2));
expect(TimerBloc().callbacks[duration.inSeconds], contains(callback)); expect(TimerBloc().callbacks[duration.inSeconds], contains(callback));
expect(TimerBloc().timers[duration.inSeconds], isNot(isNull)); expect(TimerBloc().timers[duration.inSeconds], isNot(isNull));
}); });

2
packages/nextcloud/test/webdav_test.dart

@ -301,7 +301,7 @@ void main() {
destination, destination,
onProgress: progressValues.add, onProgress: progressValues.add,
); );
expect(progressValues, [100.0, 100.0]); expect(progressValues, containsAll([100.0, 100.0]));
expect(destination.readAsBytesSync(), source.readAsBytesSync()); expect(destination.readAsBytesSync(), source.readAsBytesSync());
destinationDir.deleteSync(recursive: true); destinationDir.deleteSync(recursive: true);

Loading…
Cancel
Save