summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikesamuel <mikesamuel@ad8eed46-c659-4a31-e19d-951d88f54425>2014-05-14 16:33:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-14 16:33:11 +0000
commitcf5c3edfb9b79639d349f03b57e364f5d26b0ca9 (patch)
tree0c318bd1b57a3f58657fc23670b824284dc48d4b
parent2a50e072b107b8328ff0251226b79d667e5232ad (diff)
parent44d782b87eb0aa32d8cf12a3d39be9de05b3c544 (diff)
downloadsanitizer-cf5c3edfb9b79639d349f03b57e364f5d26b0ca9.tar.gz
am 44d782b8: some cosmetic tweaks to the part of the CSS fuzzer that logs long running operations
* commit '44d782b87eb0aa32d8cf12a3d39be9de05b3c544': some cosmetic tweaks to the part of the CSS fuzzer that logs long running operations
-rw-r--r--src/tests/org/owasp/html/CssFuzzerTest.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tests/org/owasp/html/CssFuzzerTest.java b/src/tests/org/owasp/html/CssFuzzerTest.java
index b6cd30c..df4f3ae 100644
--- a/src/tests/org/owasp/html/CssFuzzerTest.java
+++ b/src/tests/org/owasp/html/CssFuzzerTest.java
@@ -62,20 +62,20 @@ public class CssFuzzerTest extends FuzzyTestCase {
public void run() {
synchronized (this) {
- while (true) {
- try {
- this.wait();
- } catch (InterruptedException ex) {
- break;
- }
- String input = this.input;
- if (input == null) { break; } // Done
- long started = this.started;
- long now = System.nanoTime();
- if (now - started >= 1000000000L) {
- System.err.println(
- "`" + input + "` is slow. seed=" + CssFuzzerTest.this.seed);
+ try {
+ while (true) {
+ this.wait(1000 /* ms = 1s */);
+ String input = this.input;
+ if (input == null) { break; } // Done
+ long started = this.started;
+ long now = System.nanoTime();
+ if (now - started >= 1000000000L /* ns = 1s */) {
+ System.err.println(
+ "`" + input + "` is slow. seed=" + CssFuzzerTest.this.seed);
+ }
}
+ } catch (InterruptedException ex) {
+ // Done
}
}
}