-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
unexpected ordering of tests? #2219
Comments
@coreyoconnor If you could use the debugger to find the location in testkit where the ordering gets mangled or write a standalone reproduction that would be greatly appreciated. Then we could fix the issue and add regression tests to make sure we actually do keep the ordering. |
As for standalone reproduction. I'm in the process of opensourcing the whole project I'm working on. So there will be that shortly. But a more focused tests seems easy. I'll see what I can do. |
I think you are right about |
I haven't had time to look at this again. The draft PR I put I think changes too much. Looking at a narrower change. |
Not entirely sure. Trying to work through some oddness I'm encountering in a library that uses distage-test when upgrading the distage dependency from 1.1.0-M23 to 1.2.15. This library also replaces the test registration mechanism which, no doubt, complicates all this. Anyways:
Sequential
to request sequential ordering of test cases: https://izumi.7mind.io/distage/distage-testkit.html#execution-orderThe expectation is that for a given group, the expected sequential order is guaranteed. from docs: "This test requires the effect of the first test case to occur prior to the second test case. As discussed Execution Order section: Without configuring test cases for sequential execution this order would not be guaranteed."
However, I have a test structured like below. Which executes out of order. Specifically, the order ends up 1 and then 4. Which is unexpected.
The test logs indicate all 6 tests are in the same enviornment:
Of course, perhaps my understanding or the docs are wrong. Which, iirc, I wrote that doc so that would just be the worst T_T
Looking into the distage code
groupTests
seems to determine the (unintented?) ordering:Which eventually goes to
ExtParTraverse
:The
_.groupBy
s stick out to me. IIRC those do not guarantee order stability.But why does this only show up in my
Case
tests? I mentioned I override the test registration. Internally I use avar registeredTest = Seq.empty[...]
instead of anmutable.ArrayBuffer
. Which, if I change from one to the other: A different test order.Am I incorrect in my expectations?
The text was updated successfully, but these errors were encountered: