-
Notifications
You must be signed in to change notification settings - Fork 81
Add warnings when properties are overwritten by included files #9038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warnings when properties are overwritten by included files #9038
Conversation
…r maintain current behaviour.
…eScenarioProperties # Conflicts: # larva/src/main/java/org/frankframework/larva/Scenario.java
…eScenarioProperties
@@ -34,6 +34,7 @@ public class LarvaConfig { | |||
|
|||
private @Getter @Setter int timeout = GLOBAL_TIMEOUT_MILLIS; | |||
private @Getter @Setter int waitBeforeCleanup = 100; | |||
private @Getter @Setter boolean scenarioPropertyOverridesIncluded = AppConstants.getInstance().getBoolean("larva.scenarioPropertyOverridesIncluded", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the name of this option, or the app-constant property.
Please suggest a better name!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik kom niet echt op wat beters helaas
@@ -32,7 +32,7 @@ public enum LarvaLogLevel { | |||
SCENARIO_PASSED_FAILED("scenario passed/failed"), | |||
SCENARIO_FAILED("scenario failed"), | |||
TOTALS("totals"), | |||
WARNING("error"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dat is best vreemd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-pasta foutje van een vorig PR denk ik
messages.add(new LarvaMessage(LarvaLogLevel.WARNING, warning)); | ||
} | ||
|
||
public void addError(@Nonnull String warning) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error? ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy-pasta foutje 🙈
includeFilename = properties.getProperty("include" + i); | ||
} | ||
while (includeFilename != null) { | ||
private @Nonnull List<LarvaMessage> addIncludedProperties(@Nonnull File scenarioFile, @Nonnull Properties properties, @Nonnull String directory) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addIncludedPropertiesAndGetWarnings
oid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vind ik ook niks. Misschien als extra parameter meegeven aan alle methods, waarin alle warnings van het laden van een scenario kunnen worden toegevoegd.
@@ -34,6 +34,7 @@ public class LarvaConfig { | |||
|
|||
private @Getter @Setter int timeout = GLOBAL_TIMEOUT_MILLIS; | |||
private @Getter @Setter int waitBeforeCleanup = 100; | |||
private @Getter @Setter boolean scenarioPropertyOverridesIncluded = AppConstants.getInstance().getBoolean("larva.scenarioPropertyOverridesIncluded", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik kom niet echt op wat beters helaas
|
Also add an option to use property from scenario file, or from the included file.