@@ -422,13 +422,6 @@ extension GRDBTestCase {
422
422
throws
423
423
where Reducer. Value: Equatable
424
424
{
425
- #if SQLITE_HAS_CODEC || GRDBCUSTOMSQLITE
426
- // debug SQLite builds can be *very* slow
427
- let timeout : TimeInterval = 4
428
- #else
429
- let timeout : TimeInterval = 1
430
- #endif
431
-
432
425
func test(
433
426
observation: ValueObservation < Reducer > ,
434
427
scheduling scheduler: ValueObservationScheduler ,
@@ -455,7 +448,7 @@ extension GRDBTestCase {
455
448
try writer. writeWithoutTransaction ( recordedUpdates)
456
449
457
450
let expectation = recorder. next ( expectedValues. count)
458
- let values = try wait ( for: expectation, timeout: timeout )
451
+ let values = try wait ( for: expectation, timeout: 5 )
459
452
XCTAssertEqual (
460
453
values, expectedValues,
461
454
" \( #function) , \( writer) , \( scheduler) " , file: file, line: line)
@@ -485,7 +478,7 @@ extension GRDBTestCase {
485
478
}
486
479
487
480
let expectation = recorder. next ( expectedValues. count)
488
- let values = try wait ( for: expectation, timeout: timeout )
481
+ let values = try wait ( for: expectation, timeout: 5 )
489
482
XCTAssertEqual (
490
483
values, expectedValues,
491
484
" \( #function) , \( writer) , \( scheduler) " , file: file, line: line)
@@ -516,14 +509,14 @@ extension GRDBTestCase {
516
509
if waitForLast {
517
510
// Optimization!
518
511
let expectation = recorder. prefix ( until: { $0 == lastExpectedValue } )
519
- recordedValues = try wait ( for: expectation, timeout: timeout )
512
+ recordedValues = try wait ( for: expectation, timeout: 5 )
520
513
} else {
521
514
// Slow!
522
515
assertionFailure ( " Please rewrite your test, because it is too slow: make sure the last expected value is unique. " )
523
516
let expectation = recorder
524
517
. prefix ( expectedValues. count + 2 /* pool may perform double initial fetch */)
525
518
. inverted
526
- recordedValues = try wait ( for: expectation, timeout: timeout )
519
+ recordedValues = try wait ( for: expectation, timeout: 5 )
527
520
}
528
521
529
522
if scheduler. immediateInitialValue ( ) {
@@ -565,14 +558,14 @@ extension GRDBTestCase {
565
558
if waitForLast {
566
559
// Optimization!
567
560
let expectation = recorder. prefix ( until: { $0 == lastExpectedValue } )
568
- recordedValues = try wait ( for: expectation, timeout: timeout )
561
+ recordedValues = try wait ( for: expectation, timeout: 5 )
569
562
} else {
570
563
// Slow!
571
564
assertionFailure ( " Please rewrite your test, because it is too slow: make sure the last expected value is unique. " )
572
565
let expectation = recorder
573
566
. prefix ( expectedValues. count + 2 /* pool may perform double initial fetch */)
574
567
. inverted
575
- recordedValues = try wait ( for: expectation, timeout: timeout )
568
+ recordedValues = try wait ( for: expectation, timeout: 5 )
576
569
}
577
570
578
571
XCTAssertEqual ( recordedValues. first, expectedValues. first)
@@ -639,13 +632,6 @@ extension GRDBTestCase {
639
632
line: UInt )
640
633
throws
641
634
{
642
- #if SQLITE_HAS_CODEC || GRDBCUSTOMSQLITE
643
- // debug SQLite builds can be *very* slow
644
- let timeout : TimeInterval = 2
645
- #else
646
- let timeout : TimeInterval = 1
647
- #endif
648
-
649
635
func test(
650
636
observation: ValueObservation < Reducer > ,
651
637
scheduling scheduler: ValueObservationScheduler ,
@@ -659,7 +645,7 @@ extension GRDBTestCase {
659
645
scheduling: scheduler,
660
646
onError: { _ in testErrorDispatching ( ) } )
661
647
662
- let ( _, error) = try wait ( for: recorder. failure ( ) , timeout: timeout )
648
+ let ( _, error) = try wait ( for: recorder. failure ( ) , timeout: 5 )
663
649
if let error = error as? Failure {
664
650
try testFailure ( error, writer)
665
651
} else {
0 commit comments