diff --git a/MoreLinq.Test/InterleaveTest.cs b/MoreLinq.Test/InterleaveTest.cs index 2dbdb30c5..77dddb0cf 100644 --- a/MoreLinq.Test/InterleaveTest.cs +++ b/MoreLinq.Test/InterleaveTest.cs @@ -55,8 +55,9 @@ public void TestInterleaveEarlyThrowOnNullElementInOtherSequences() [Test] public void TestInterleaveDoNoCallMoveNextEagerly() { - var sequenceA = Enumerable.Range(1, 1); - var sequenceB = MoreEnumerable.From(() => throw new TestException()); + using var sequenceA = TestingSequence.Of(1); + using var sequenceB = MoreEnumerable.From(() => throw new TestException()) + .AsTestingSequence(); var result = sequenceA.Interleave(sequenceB).Take(1); Assert.That(() => result.Consume(), Throws.Nothing);