Skip to content

Commit 77f071f

Browse files
committed
chore(tests): workaround rate limit for test suite with 300ms delay
1 parent 482c82b commit 77f071f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

IGDB.Tests/IGDB.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>net9.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
7+
<DefineConstants>$(DefineConstants);IGDB_TESTS</DefineConstants>
78
</PropertyGroup>
89

910
<ItemGroup>

IGDB/IGDBApi.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ public IGDBClient(string clientId, string clientSecret, ITokenStore tokenStore)
124124
"Bearer", twitchToken.AccessToken);
125125
}
126126

127+
#if IGDB_TESTS
128+
129+
// Workaround rate limit in an extremely naive way...
130+
await Task.Delay(1000 / 3);
131+
132+
#endif
133+
127134
})
128135
{
129136
JsonSerializerSettings = DefaultJsonSerializerSettings

0 commit comments

Comments
 (0)