mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +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]
|
[TestMethod]
|
||||||
public async Task RequestEncryptedAppTicketAsyncWithData()
|
public async Task RequestEncryptedAppTicketAsyncWithData()
|
||||||
{
|
{
|
||||||
var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
|
for ( int i=0; i<10; i++ )
|
||||||
Assert.IsNotNull( data );
|
{
|
||||||
|
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]
|
[TestMethod]
|
||||||
public async Task RequestEncryptedAppTicketAsync()
|
public async Task RequestEncryptedAppTicketAsync()
|
||||||
{
|
{
|
||||||
var data = await SteamUser.RequestEncryptedAppTicketAsync();
|
for ( int i = 0; i < 6; i++ )
|
||||||
Assert.IsNotNull( data );
|
{
|
||||||
|
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