JPERF-999: Allow specifying Scenario class without having it in classpath#70
Draft
JPERF-999: Allow specifying Scenario class without having it in classpath#70
Conversation
Contributor
Author
|
Could do the same for but nto sure if it's worth. |
c333b48 to
b1dd750
Compare
…path virtual-users consumers use the VirtualUserBehavior and VirtualUserOptions classes for serializing VU options. Requiring to set Scenatio as Class artificially enforces the consumer to depend on the VU JAR classes.
b1dd750 to
c1bcc6e
Compare
Contributor
Author
|
Simplified it a bit more. Turned out that after my changes we didn't need |
dagguh
reviewed
Feb 15, 2023
| private val scenario = behavior.scenario.getConstructor().newInstance() as Scenario | ||
| private val scenario = Class.forName(behavior.scenarioClass).getConstructor().newInstance() as Scenario | ||
| private val browser = behavior.browser.getConstructor().newInstance() as Browser | ||
| private val userGenerator = options.behavior.userGenerator.getConstructor().newInstance() as UserGenerator |
Contributor
There was a problem hiding this comment.
Wanna do the same for UserGenerator for consistency?
Contributor
|
WRT CI: This was fixed in |
Contributor
Yeah, it's gonna be a WTF factor. |
Contributor
Author
|
Do you think this is the right direction of the code? In fact it's not currently necessary, however I thought that it will be technically better and would simplify some dependency sets. It could also in some cases allow for 2 conflicting classpaths between VU JAR and test code to coexist (you don't need to depend on the VU JAR). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
virtual-users consumers use the VirtualUserBehavior and VirtualUserOptions classes for serializing VU options. Requiring to set Scenatio as Class artificially enforces the consumer to depend on the VU JAR classes.