Skip to content

Commit 74289e4

Browse files
committed
Remove unnecessary tests
1 parent 8122e54 commit 74289e4

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

Tests/AsyncAlgorithmsTests/TestMerge.swift

-56
Original file line numberDiff line numberDiff line change
@@ -506,62 +506,6 @@ final class TestMerge3: XCTestCase {
506506
wait(for: [finished], timeout: 1.0)
507507
}
508508

509-
// MARK: - SequenceDeinitialized
510-
511-
func testSequenceDeinitialized_whenInitial() async throws {
512-
// This tests works if nothing bad happens
513-
// Dropping the sequence has no visible side effects
514-
let _ = merge([1].async, [2].async)
515-
}
516-
517-
func testSequenceDeinitialized_whenMerging() async throws {
518-
var merge: _! = merge([1].async, [2].async)
519-
520-
var iterator = merge.makeAsyncIterator()
521-
522-
merge = nil
523-
524-
let nextValue = await iterator.next()
525-
XCTAssertNotNil(nextValue)
526-
}
527-
528-
func testSequenceDeinitialized_whenUpstreamFailure() async throws {
529-
let channel1 = AsyncChannel<Int>()
530-
let channel2 = AsyncThrowingChannel<Int, Error>()
531-
var merge: _! = merge([1].async, channel1, channel2)
532-
533-
var iterator = merge.makeAsyncIterator()
534-
// We need to give the task that consumes the upstreams
535-
// a bit of time to spin up all child tasks
536-
try await Task.sleep(nanoseconds: 1000000)
537-
538-
let firstValue = try await iterator.next()
539-
XCTAssertEqual(firstValue, 1)
540-
541-
// Now we are buffering up one more value
542-
// and then transition the merge sequence to upstreamFailure
543-
await channel1.send(2)
544-
channel2.fail(Failure())
545-
546-
// We need to give the task that consumes the upstream
547-
// a bit of time to process the failure
548-
try await Task.sleep(nanoseconds: 1000000)
549-
550-
merge = nil
551-
}
552-
553-
func testSequenceDeinitialized_whenFinished() async throws {
554-
var merge: _! = merge([1].async, [].async)
555-
556-
var iterator: _? = merge.makeAsyncIterator()
557-
let firstValue = await iterator?.next()
558-
XCTAssertEqual(firstValue, 1)
559-
560-
iterator = nil
561-
562-
merge = nil
563-
}
564-
565509
// MARK: - IteratorInitialized
566510

567511
func testIteratorInitialized_whenInitial() async throws {

0 commit comments

Comments
 (0)