Skip to content

Commit 94155a9

Browse files
Simon Zhao (BEYONDSOFT CONSULTING INC)SimonZhao888
authored andcommitted
update test code
1 parent 3659ae4 commit 94155a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/dotnet.Tests/GivenExponentialRetry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public async Task ItReturnsOnSuccess()
2929
public async Task ItRetriesOnError()
3030
{
3131
var retryCount = 0;
32-
Func<Task<string>> action = () =>
32+
Func<Task<string?>> action = () => // Updated to use nullable reference type
3333
{
3434
retryCount++;
35-
return Task.FromResult<string>(null);
35+
return Task.FromResult<string?>(null); // Updated to match nullable reference type
3636
};
37-
var res = await ExponentialRetry.ExecuteWithRetryOnFailure<string>(action, 2, timer: () => ExponentialRetry.Timer(ExponentialRetry.TestingIntervals));
37+
var res = await ExponentialRetry.ExecuteWithRetryOnFailure<string?>(action, 2, timer: () => ExponentialRetry.Timer(ExponentialRetry.TestingIntervals));
3838

3939
res.Should().BeNull();
4040
retryCount.Should().Be(2);

0 commit comments

Comments
 (0)