Skip to content

Commit

Permalink
Fixed flaky failing test for authsandboxspec
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Apr 18, 2024
1 parent 1197d1b commit 856ebd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IO.Ably.Tests.Shared/AuthTests/AuthSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public async Task RealTimeWithAuthUrl_WhenTokenExpired_And_WithServerTime_And_No
};
await Task.Delay(2000);
// This makes sure we get server time
((AblyAuth)mainClient.Auth).SetServerTime();
await ((AblyAuth)mainClient.Auth).SetServerTime();

var ex = await Assert.ThrowsAsync<AblyException>(() => mainClient.StatsAsync());
ex.ErrorInfo.Should().BeSameAs(ErrorInfo.NonRenewableToken);
Expand All @@ -338,7 +338,7 @@ public async Task Auth_WithRealtimeClient_WhenAuthFails_ShouldTransitionToOrRema
{
async Task TestConnectingBecomesDisconnected(string context, Action<ClientOptions, TestEnvironmentSettings> optionsAction)
{
TaskCompletionAwaiter tca = new TaskCompletionAwaiter(5000);
TaskCompletionAwaiter tca = new TaskCompletionAwaiter();
var realtimeClient = await GetRealtimeClient(protocol, optionsAction);
realtimeClient.Connection.On(ConnectionEvent.Disconnected, change =>
{
Expand Down Expand Up @@ -387,7 +387,7 @@ async Task<TokenDetails> GetToken()
var authRestClient = await GetRestClient(protocol);
var token = await authRestClient.Auth.RequestTokenAsync(new TokenParams
{
Ttl = TimeSpan.FromMilliseconds(2000)
Ttl = TimeSpan.FromMilliseconds(10000)
});
return token;
}
Expand Down

0 comments on commit 856ebd3

Please sign in to comment.