Skip to content

Commit

Permalink
Merge pull request #944 from EMResearch/issue-logs-nd
Browse files Browse the repository at this point in the history
fixed issue with non-determinism in tests
  • Loading branch information
arcuri82 authored Apr 4, 2024
2 parents 1f6ea2b + 8f69766 commit ec6c191
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/src/main/kotlin/org/evomaster/core/EMConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ class EMConfig {
cff.configs[it.name] = default
}

LoggingUtil.uniqueUserInfo("Going to create configuration file at: ${Path(configPath).toAbsolutePath()}")
if(! avoidNonDeterministicLogs) {
LoggingUtil.uniqueUserInfo("Going to create configuration file at: ${Path(configPath).toAbsolutePath()}")
}
ConfigUtil.createConfigFileTemplate(configPath, cff)
}
}
Expand All @@ -338,7 +340,9 @@ class EMConfig {
}
}

LoggingUtil.uniqueUserInfo("Loading configuration file from: ${Path(configPath).toAbsolutePath()}")
if(! avoidNonDeterministicLogs) {
LoggingUtil.uniqueUserInfo("Loading configuration file from: ${Path(configPath).toAbsolutePath()}")
}

val cf = ConfigUtil.readFromFile(configPath)
cf.validateAndNormalizeAuth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ protected String runAndCheckDeterminism(int iterations, Consumer<List<String>> l
"--sutControllerPort", "" + controllerPort,
"--maxActionEvaluations", "" + iterations,
"--stoppingCriterion", "FITNESS_EVALUATIONS",
"--useTimeInFeedbackSampling" , "false"
"--useTimeInFeedbackSampling" , "false",
"--createConfigPathIfMissing", "false"
));

return isDeterminismConsumer(args, lambda, times, notDeterminism);
Expand Down

0 comments on commit ec6c191

Please sign in to comment.