-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 9.2
-
Fix Version/s: 9.2
-
Epic Link:
-
Tags:
-
Sprint:nxcore 9.2.6
-
Story Points:2
Since new Runtime NXP-19326, this test failed each time.
This is due to @LocalDeploy annotations on method which deploys a sql repository contribution which overrides the MongoDB repository declaration.
By starting earlier due to alphabetical order. As it @Before method is never called because test failed just before.
We could probably add a require in culprit contribution to fix the problem. As it, @Before method should be called and ignore the tests.
But here we want to ignore the test based on CoreFeature initialization:
@Before public void setUp() { assumeTrue(coreFeature.getStorageConfiguration().isVCS()); // MySQL fulltext is funky with respect to what words it finds in small databases // so don't bother testing on MySQL, this is mostly a configuration test anyway assumeTrue(!coreFeature.getStorageConfiguration().isVCSMySQL()); }
I can annotate my test class with ConditionalIgnoreRule.Ignore and reflect the condition in the implementation to provide.
Just doing this will work, but we will have an error for the first test, because it first tries to deploy the culprit contribution and then the test is ignored. This is due to ConditionalIgnoreRule mechanism working as a MethodRule.
When I annote my class, I expect the condition to be run before running the test, just after class initialization. Currently putting annotation on class or on a method has the same effect, condition is evaluated after all features beforeMethodRun step, so after deploy annotations on method processing.
So two things to do:
NXP-22623- Fix the test by using ConditionalIgnoreRule.Ignore because how the test is ignored now can't work at this step
- depends on
-
NXP-22623 Make ConditionalIgnoreRule.Feature declare a test rule
- Resolved