[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/master] Avoid integer overflow in tests.



commit ed9c9f342716edcb7ada756c4d5713e6296abf3d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 16:07:29 2018 +0200

    Avoid integer overflow in tests.
---
 src/test/java/org/torproject/onionoo/server/ResourceServletTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java b/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
index 063f550..58bab5d 100644
--- a/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
+++ b/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
@@ -1367,7 +1367,7 @@ public class ResourceServletTest {
   public void testFirstSeenDaysMaxIntPlusOne() {
     this.assertErrorStatusCode(
         "/summary?first_seen_days="
-        + String.valueOf(Integer.MAX_VALUE + 1), 400);
+        + String.valueOf(((long) Integer.MAX_VALUE) + 1L), 400);
   }
 
   @Test(timeout = 100)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits