-
Notifications
You must be signed in to change notification settings - Fork 16
JPERF-999: Allow specifying Scenario class without having it in classpath #70
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
base: master
Are you sure you want to change the base?
Conversation
|
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
|
Simplified it a bit more. Turned out that after my changes we didn't need |
| 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 |
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.
Wanna do the same for UserGenerator for consistency?
|
WRT CI: This was fixed in |
Yeah, it's gonna be a WTF factor. |
|
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). |
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.