Replies: 4 comments
|
No, that's currently not possible and I don't think it would be feasible. Resource locks need to be known prior to execution (to avoid deadlocks) and method parameters are only known during execution. |
0 replies
|
Thanks for the quick reply. I can setup a map of locks inside my test to do this but the downside is that all the test methods run immediately and wait on the locks which means that the resulting test duration is completely inaccurate. Is there any way to affect start time from inside a running test - i.e. I'd set the start time to be after the test has obtained the locks? I'm guessing not but maybe? |
0 replies
|
No, there's no way to do that. |
0 replies
|
OK - thanks for the info. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is there a way to lock based on the input of a parameterized test?
With something like...
I'd like to lock on the resource being passed.
So
testA("Foo")could run concurrently withtestB("Bar")but not withtestB("Foo").Is that currently possible?
If not could
ResourceLocksProvider#provideForMethodbe changed to also accept theMethodSourcevalues?e.g.
Where
methodArgswould be"Foo"when runningtestA("Foo")All reactions