summaryrefslogtreecommitdiff
path: root/test/java
diff options
context:
space:
mode:
authorluccioman <luccioman@users.noreply.github.com>2017-10-09 19:08:39 +0200
committerluccioman <luccioman@users.noreply.github.com>2017-10-09 19:08:39 +0200
commit5bf76f058a569f1f1ebe61528c8ed8fe1137a2a7 (patch)
tree98e69c43b001a514c31befc501a12580b4beb0b7 /test/java
parentdbff7b14fcc405d8b8ab75e1d784595459ae00c1 (diff)
Adjusted ResponseHeaderTest to succeed on slow or highly loaded CPU
Diffstat (limited to 'test/java')
-rw-r--r--test/java/net/yacy/cora/protocol/ResponseHeaderTest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/java/net/yacy/cora/protocol/ResponseHeaderTest.java b/test/java/net/yacy/cora/protocol/ResponseHeaderTest.java
index 4d16f381d..b2a3bda0f 100644
--- a/test/java/net/yacy/cora/protocol/ResponseHeaderTest.java
+++ b/test/java/net/yacy/cora/protocol/ResponseHeaderTest.java
@@ -1,8 +1,10 @@
package net.yacy.cora.protocol;
+import static org.junit.Assert.assertTrue;
+
import java.util.Date;
+
import org.junit.Test;
-import static org.junit.Assert.*;
public class ResponseHeaderTest {
@@ -30,17 +32,17 @@ public class ResponseHeaderTest {
testhdr2.date();
testhdr3.lastModified();
- assertEquals("access-sequence 1 date=null lastmod=null AGE="+age1, 0, age1);
+ assertTrue("access-sequence 1 date=null lastmod=null AGE="+age1, age1 >= 0);
testhdr2.lastModified();
long age2 = testhdr2.age();
- assertEquals("access-sequence 2 date=null lastmod=null AGE="+age2, 0, age2);
+ assertTrue("access-sequence 2 date=null lastmod=null AGE="+age2, age2 >= 0);
testhdr3.date();
long age3 = testhdr3.age();
- assertEquals("access-sequence 3 date=null lastmod=null AGE="+age3, 0, age3);
+ assertTrue("access-sequence 3 date=null lastmod=null AGE="+age3, age3 >= 0);
Date past = new Date(System.currentTimeMillis() / 2);
Date future = new Date(System.currentTimeMillis() * 2);