Fix failing Calcite unit tests with existing work-a-round for calcite property setup#9324
Conversation
…lcite test classes introduced in PR 9279 to fix
suneet-s
left a comment
There was a problem hiding this comment.
Strange... I couldn't get these tests to fail locally. I tried running them one by one, but that didn't isolate the problem either. I wrote these tests to use mocks, so it shouldn't really rely on any Calcite system properties being set
This is how I ran my tests mvn -Dtest=NamedDruidSchemaTest test
|
@suneet-s what if you just run I did some analysis on master over lunch that seemed to have narrowed it down to ##PASS
|
|
@capistrant Thanks for the repro steps. When I wrote the tests, but it was in a class I didn't write, and they passed on Travis, so I didn't dig in to why they were failing locally. I wonder if we should be unsetting the system properties that |
|
I looked into this a little bit and I think I'm okay with Nishants approach to fix this with the TravisCI passing despite all of this has me scratching my head. Maybe the tests are running in a different order than on local..? Or someone in the past messed with the configuration to get past this? I personally don't see the current approach as a problem. It seems like more of an inconvenience. However, if you have thoughts on a better solution, I think anyone would welcome it because what we currently have here stinks |
|
@capistrant That makes sense. I tried for a little bit to find a cleaner solution, but haven't found a working solution yet. It looks like the CI failures are flaky. Maybe one of the committers can re-trigger the failed tests. |
|
I created #9333 in case I or someone else is able to circle back on this and see if there is a better way to tackle the problem than the current solution. |
suneet-s
left a comment
There was a problem hiding this comment.
Sorry, I thought I approved this a few days ago...
clintropolis
left a comment
There was a problem hiding this comment.
This fixes running tests locally for me 👍
Description
Issue #4909 seems to have popped up again. At least for me. I applied the fix from #5451 liberally to all new Calcite test classes introduced in #9279 to fix on my local. Maybe @nishantmonu51 can speak to if my solve properly mirrors his initial fix.
On my local I can reproduce each time by building the sql module without these changes and then remediate by applying these changes. As I said above, I liberally slapped the class extension on each new class that I identified in Calcite as I was working on a different effort when this popped up after merging master into my branch. Hoping Nishant can quickly identify if my application was overkill and I can remove in un-needed locations.
This PR has:
Key changed/added classes in this PR
N/A... Just some small unit test changes.