Browse Source

Merge pull request #565 from nextcloud/fix/flaky-tests

test(neon,nextcloud): Fix flaky tests
pull/558/head
Kate 1 year ago committed by GitHub
parent
commit
176cceada1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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);
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().timers[duration.inSeconds], isNot(isNull));
});

2
packages/nextcloud/test/webdav_test.dart

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

Loading…
Cancel
Save