nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4fccbf
)
popcorn: pop_test uses NIT_TESTING_ID to determine test port
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 23 Oct 2017 14:05:42 +0000
(10:05 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 23 Oct 2017 14:05:42 +0000
(10:05 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/popcorn/pop_tests.nit
patch
|
blob
|
history
diff --git
a/lib/popcorn/pop_tests.nit
b/lib/popcorn/pop_tests.nit
index
6c5985d
..
73bb0f5
100644
(file)
--- 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.