From a506213cd357b4bd41618935f99bd538eb80b513 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 23 Oct 2017 10:05:42 -0400 Subject: [PATCH] popcorn: pop_test uses NIT_TESTING_ID to determine test port Signed-off-by: Alexandre Terrasa --- lib/popcorn/pop_tests.nit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/popcorn/pop_tests.nit b/lib/popcorn/pop_tests.nit index 6c5985d..73bb0f5 100644 --- a/lib/popcorn/pop_tests.nit +++ b/lib/popcorn/pop_tests.nit @@ -79,9 +79,11 @@ redef class Sys # Return a new port for each instance fun test_port: Int do - srand - return 10000+20000.rand + return testing_id % 20000 + 10000 end + + # Nitdoc testing ID + fun testing_id: Int do return "NIT_TESTING_ID".environ.to_i end # Thread running the App to test. -- 1.7.9.5