File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,15 @@ public abstract class TestingBase
1515
1616 private static readonly IConfigurationRoot ConfigurationRoot ;
1717
18+ private static FinancialModelingPrepOptions testingOptions ;
19+
1820 static TestingBase ( )
1921 {
2022 var config = new ConfigurationBuilder ( ) ;
2123 config . AddEnvironmentVariables ( "FMP_TESTS_" ) ;
2224 ConfigurationRoot = config . Build ( ) ;
25+
26+ testingOptions = CreateTestingOptions ( ) ;
2327 }
2428
2529 public TestingBase ( ITestOutputHelper testOutput )
@@ -35,20 +39,22 @@ public TestingBase(ITestOutputHelper testOutput)
3539 builder . SetMinimumLevel ( LogLevel . Debug ) ;
3640 } ) ;
3741
38- this . Services . AddFinancialModelingPrepApiClient ( CreateDefaultFMPOptions ( ) ) ;
42+ this . Services . AddFinancialModelingPrepApiClient ( testingOptions ) ;
3943
4044 Build ( ) ;
4145 }
4246
43- private static FinancialModelingPrepOptions CreateDefaultFMPOptions ( )
47+ private static FinancialModelingPrepOptions CreateTestingOptions ( )
4448 {
4549 var apiKeySection = ConfigurationRoot . GetSection ( "API_KEY" ) ;
4650
4751 var apiKey = apiKeySection ? . Value ?? "demo" ;
4852
4953 return new FinancialModelingPrepOptions ( )
5054 {
51- ApiKey = apiKey
55+ ApiKey = apiKey ,
56+ MaxAPICallsPerMinute = 150 , // lower the amount to avoid hitting limits on subsequent commit pushes
57+ MaxRequestPerSecond = 5 , // lower the amount to avoid hitting limits on subsequent commit pushes
5258 } ;
5359 }
5460
You can’t perform that action at this time.
0 commit comments