mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 14:45:51 +03:00
Chnaged RequestEncryptedAppTicketAsync tests to keep in mind that it can only be called once every 60 seconds
This commit is contained in:
parent
59eabc1302
commit
998c18764a
@ -136,19 +136,43 @@ public void IsPhoneRequiringVerification()
|
||||
[TestMethod]
|
||||
public async Task RequestEncryptedAppTicketAsyncWithData()
|
||||
{
|
||||
var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
|
||||
Assert.IsNotNull( data );
|
||||
for ( int i=0; i<10; i++ )
|
||||
{
|
||||
var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
|
||||
|
||||
Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ))}" );
|
||||
if ( data == null )
|
||||
{
|
||||
Console.WriteLine( $"Attempt {i}: Returned null.. waiting 1 seconds" );
|
||||
await Task.Delay( 10000 );
|
||||
continue;
|
||||
}
|
||||
|
||||
Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ) )}" );
|
||||
return;
|
||||
}
|
||||
|
||||
Assert.Fail();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task RequestEncryptedAppTicketAsync()
|
||||
{
|
||||
var data = await SteamUser.RequestEncryptedAppTicketAsync();
|
||||
Assert.IsNotNull( data );
|
||||
for ( int i = 0; i < 6; i++ )
|
||||
{
|
||||
var data = await SteamUser.RequestEncryptedAppTicketAsync();
|
||||
|
||||
Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ) )}" );
|
||||
if ( data == null )
|
||||
{
|
||||
Console.WriteLine( $"Attempt {i}: Returned null.. waiting 1 seconds" );
|
||||
await Task.Delay( 10000 );
|
||||
continue;
|
||||
}
|
||||
|
||||
Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ) )}" );
|
||||
return;
|
||||
}
|
||||
|
||||
Assert.Fail();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user