WIP: Changeover most DFDLTestSuite invocations to Runner#430
WIP: Changeover most DFDLTestSuite invocations to Runner#430IanCarlsonOwl wants to merge 2 commits intoapache:mainfrom
Conversation
|
There are a number of calls to DFDLTestSuite still outstanding, but I wanted to get this much in front of others for a sanity-check, and to ensure it builds on all of our target systems. |
|
|
||
| def apply(elem: scala.xml.Elem, options: RunnerOpts): Runner = | ||
| new Runner(elem, options) | ||
| } |
There was a problem hiding this comment.
I'm concerned that this could break existing Runners not in the daffodil repo. Other schema repos use this Runner for testing and they could currently provide options which would no longer compile once this change is made. I'm wondering if it makes sense to keep an apply the old dir/file apply method with all options defaulted and creates the new RunnerOpts using those values? We can deprecate that apply method so other repos will still work but get a message to fix them?
There was a problem hiding this comment.
I would second this. We need the original Runner factory method, as there are dozens of DFDL schemas we know of, and possibly others we don't know of or have access to, which are using the existing Runner factory.
There was a problem hiding this comment.
In commit b123d9f I restored the old apply methods.
| runnerDelimited.reset | ||
| runnerMD.reset | ||
| runnerMD_NV.reset | ||
| runnerBB.reset |
There was a problem hiding this comment.
Since we are modifying so many test files do we also want to add the shutDown method to reset the runners? I think many of them are missing.
I'm wondering if a convenient way to do this would be to add a new mixin (i.e. DaffodilTestSuite) that implements shutDown and uses reflection to find any Runner members and automatically call reset on them?
There was a problem hiding this comment.
I would call this mixin AllRunnersAutoShutdownMixin.
stevedlawrence
left a comment
There was a problem hiding this comment.
Seems like a reasonable approach to me 👍
tuxji
left a comment
There was a problem hiding this comment.
I agree with Steve's suggestions, especially the one to define a trait DFDLTestSuite with an @afterclass shutDown method which XXXTests objects can extend to automatically call reset() on any member fields matching the type DFDLTestSuite. Overall, your approach looks good.
Tweak the interface to the Runner object, as well as creating a RunnerOpts object to handle the multiple combinations of parameters used by various tests without compromising the ability to default parameters not under test. DAFFODIL-1300
8415260 to
ae0a28f
Compare
|
Closed as inactive. Ticket DAFFODIL-1300 is closed. If there is other functionality here being worked on a new JIRA ticket is needed. |
Tweak the interface to the Runner object, as well as
creating a RunnerOpts object to handle the multiple
combinations of parameters used by various tests without
compromising the ability to default parameters
not under test.
DAFFODIL-1300