Skip to content

Commit 43a0693

Browse files
committed
[2.0.0-SNAPSHOT]
CI Report only for Java 17 (avoid rate limiter)
1 parent 70cee44 commit 43a0693

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/workflows/gradle.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
API_KEY: ${{ secrets.API_KEY }}
3838

3939
- name: SonarQube
40+
if: matrix.java == '17'
4041
run: ./gradlew sonarqube
4142
env:
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/test/java/io/goodforgod/api/etherscan/ApiRunner.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package io.goodforgod.api.etherscan;
22

33
import io.goodforgod.api.etherscan.manager.RequestQueueManager;
4-
import io.goodforgod.api.etherscan.manager.impl.SemaphoreRequestQueueManager;
5-
import java.time.Duration;
64
import org.junit.jupiter.api.AfterAll;
75
import org.junit.jupiter.api.Assertions;
86

@@ -18,14 +16,11 @@ public class ApiRunner extends Assertions {
1816

1917
static {
2018
final String key = System.getenv("API_KEY");
19+
final RequestQueueManager queueManager = RequestQueueManager.DEFAULT;
20+
2121
apiKey = (key == null || key.isEmpty())
2222
? DEFAULT_KEY
2323
: key;
24-
25-
final RequestQueueManager queueManager = (DEFAULT_KEY.equals(apiKey))
26-
? RequestQueueManager.DEFAULT
27-
: new SemaphoreRequestQueueManager(1, Duration.ofMillis(1200L), Duration.ofMillis(1200L), 0);
28-
2924
api = EtherScanAPI.builder().withApiKey(ApiRunner.apiKey).withNetwork(EthNetworks.MAINNET).withQueue(queueManager)
3025
.build();
3126
apiKovan = EtherScanAPI.builder().withApiKey(ApiRunner.apiKey).withNetwork(EthNetworks.KOVAN).withQueue(queueManager)

0 commit comments

Comments
 (0)