nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitrpg&nitcorn: replace `rand` with `NIT_TESTING_ID` for their tests
[nit.git]
/
contrib
/
nitrpg
/
src
/
test_helper.nit
diff --git
a/contrib/nitrpg/src/test_helper.nit
b/contrib/nitrpg/src/test_helper.nit
index
1ac8314
..
904862c
100644
(file)
--- a/
contrib/nitrpg/src/test_helper.nit
+++ b/
contrib/nitrpg/src/test_helper.nit
@@
-57,7
+57,8
@@
abstract class NitrpgTestHelper
# Gen a test db with a random name (to avoid race conditions).
fun gen_test_db: MongoDb do
# Gen a test db with a random name (to avoid race conditions).
fun gen_test_db: MongoDb do
- var db_name = "test_nitrpg_{get_time}_{1000.rand}"
+ var testid = "NIT_TESTING_ID".environ.to_i
+ var db_name = "test_nitrpg_{testid}"
var db = load_db(db_name)
test_dbs.add db
return db
var db = load_db(db_name)
test_dbs.add db
return db