Skip to content
Discussion options

You must be logged in to vote

Both halves of what you're describing already exist in the repo, but they've never been joined — which is a decent argument that your proposal is the missing piece rather than a duplicate.

The seed handling you sketched lives in RandomOrdererUtils:

static final String RANDOM_SEED_PROPERTY_NAME = "junit.jupiter.execution.order.random.seed";

static final long DEFAULT_SEED = System.nanoTime();

static Long getSeed(Function<String, Optional<String>> configurationParameterLookup, Logger logger) {
    return getCustomSeed(configurationParameterLookup, logger).orElse(DEFAULT_SEED);
}

Worth noting for your implementation: that class is package-private and its members are static, sitting in org.j…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@MLuc24
Comment options

Answer selected by toolforger
Comment options

You must be logged in to vote
1 reply
@mpkorstanje
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants