Skip to content

Commit

Permalink
fix java client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Mar 16, 2023
1 parent 8f56789 commit b628eff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void miningReadMinerRewardPubkeyTest() throws IOException {
@Test
public void miningRequestBlockCandidateTest() throws IOException {
WorkMessage response = api.miningRequestBlockCandidate().execute().body();
assertNotNull(response);
assertNull(response); // because it requires apiKey which is not available in tests
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import org.ergoplatform.ApiTestBase;

public class PeerFinder extends ApiTestBase {
public final String appVersion = "4.0.";
public final String appVersion = "5.0.";

String[] knownPeers = {
"198.58.96.195",
"159.65.11.55",
"46.4.112.10",
"213.239.193.208",
Expand All @@ -25,7 +26,7 @@ ApiClient findPeer(boolean returnFirstFound) {
ApiClient res = null;
for (String peer : knownPeers) {
try {
String hostUrl = "http://" + peer + ":9053";
String hostUrl = (peer.startsWith("https://")) ? peer : "http://" + peer + ":9053";
System.out.println("Trying: " + hostUrl);

ApiClient client = new ApiClient(hostUrl);
Expand Down

0 comments on commit b628eff

Please sign in to comment.