Skip to content

Commit 7730a8f

Browse files
Made tests more stable with small delay.
1 parent f69cbed commit 7730a8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/IntegrationTests/AudioNodeTests/AnalyserNodeTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public async Task GetFloatFrequencyDataAsync_ShouldPopulateBuffer()
2525
await using Float32Array buffer = await Float32Array.CreateAsync(JSRuntime, bufferLength);
2626

2727
// Act
28+
await Task.Delay(100);
2829
await node.GetFloatFrequencyDataAsync(buffer);
2930

3031
// Assert
@@ -72,8 +73,8 @@ public async Task GetFloatTimeDomainDataAsync_ShouldPopulateBuffer()
7273
await node.GetFloatTimeDomainDataAsync(buffer);
7374

7475
// Assert
75-
float tenthElement = await buffer.AtAsync(bufferLength - 1);
76-
_ = tenthElement.Should().NotBe(0);
76+
float lastElement = await buffer.AtAsync(bufferLength - 1);
77+
_ = lastElement.Should().NotBe(0);
7778
}
7879

7980
[Test]
@@ -91,6 +92,7 @@ public async Task GetByteTimeDomainDataAsync_ShouldPopulateBuffer()
9192
await using Uint8Array buffer = await Uint8Array.CreateAsync(JSRuntime, bufferLength);
9293

9394
// Act
95+
await Task.Delay(100);
9496
await node.GetByteTimeDomainDataAsync(buffer);
9597

9698
// Assert

0 commit comments

Comments
 (0)