Skip to content

Commit

Permalink
minor addition
Browse files Browse the repository at this point in the history
  • Loading branch information
seran committed Oct 26, 2023
1 parent 65056c1 commit 04aedf6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import org.evomaster.client.java.instrumentation.shared.ExternalServiceSharedUtils;
import org.evomaster.client.java.instrumentation.staticstate.ExecutionTracer;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class ExternalServiceInfoUtils {

/**
Expand All @@ -23,7 +26,13 @@ public static String[] collectExternalServiceInfo(ExternalServiceInfo remoteHost
// data structure of the external service mapping inside ExecutionTracer

// TODO: Experiment
// ExecutionTracer.addHostnameInfo(new HostnameResolutionInfo(remoteHostInfo.getHostname(), true));

try {
InetAddress.getByName(remoteHostInfo.getHostname());
ExecutionTracer.addHostnameInfo(new HostnameResolutionInfo(remoteHostInfo.getHostname(), true));
} catch (UnknownHostException e) {
ExecutionTracer.addHostnameInfo(new HostnameResolutionInfo(remoteHostInfo.getHostname(), false));
}

ExecutionTracer.addExternalServiceHost(remoteHostInfo);
String signature = remoteHostInfo.signature();
Expand Down

0 comments on commit 04aedf6

Please sign in to comment.