Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
No idea why fakeSlow was in here, or why it had a hard-coded 3 second…
Browse files Browse the repository at this point in the history
… delay, but let's get rid of it
  • Loading branch information
lightbody committed Nov 16, 2013
1 parent 457724b commit ccb4e58
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
public class BrowserMobHostNameResolver implements HostNameResolver {
private static final Log LOG = new Log();

public static ThreadLocal<Boolean> fakeSlow = new ThreadLocal<Boolean>() {
@Override
protected Boolean initialValue() {
return false;
}
};

private Map<String, String> remappings = new ConcurrentHashMap<String, String>();
private Map<String, List<String>> reverseMapping = new ConcurrentHashMap<String, List<String>>();

Expand Down Expand Up @@ -59,14 +52,6 @@ public InetAddress resolve(String hostname) throws IOException {

Date start = new Date();
Record[] records = lookup.run();
if (fakeSlow.get()) {
fakeSlow.set(false);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
Date end = new Date();

if (records == null || records.length == 0) {
Expand Down

0 comments on commit ccb4e58

Please sign in to comment.