Hey folks, I’m trying to run tests in a debugger (...
# pinot-dev
e
Hey folks, I’m trying to run tests in a debugger (via intellij), but I’m getting a specific conflict about jackson JSON module coming from pinot-connectors (not what I’d like to test, but presumably part of what’s being built in order to run the tests:
Copy code
java: incompatible types: org.apache.pinot.shaded.com.fasterxml.jackson.databind.JsonNode cannot be converted to com.fasterxml.jackson.databind.JsonNode
Any thoughts on a fix?
n
what tests are you trying to run? Do you have local changes too?
e
I’m attempting to run
org.apache.pinot.queries.FilteredAggregationsTest#testGroupBySupport
via intellij in debug mode. I do have local changes: https://github.com/apache/pinot/pull/10000
n
looks like you figured this one out? I was searching for your message in the other slack group. sorry about the miss.
e
np! I wasn’t able to get the debugger working with tests unfortunately 😞 I was able to stumble my way through with good ol’ print statements since I was only debugging one test; definitely not the most efficient haha, but got the job done in this case. running tests from cli
mvn
succeeds, but running from intellij fails to build
n
ah print statements 😂 I will give it a try with intellij on my end using your PR. Intellij has its own cache and I know sometimes it can act unexpectedly, esp. with duplicate dependencies. btw, what was the error that you would get from intellij?
e
When running the
build
phase prior to running the tests in debug mode, compilation would halt/fail on the
pinot-connectors
module with an error about shaded Vs. not Jackson JsonNode class:
Copy code
java: incompatible types: org.apache.pinot.shaded.com.fasterxml.jackson.databind.JsonNode cannot be converted to com.fasterxml.jackson.databind.JsonNode
I tried invalidating intellij caches and re-importing, but haven’t been able to shake this issue
👀 1
n
I am able to run those tests in debug on my master copy. another possibility of the cause of this issue - the dependency libraries are messed up. you can manually rectify one module at a time or just delete all *.iml files, rebuild project and re-import project in intellij. it usually fixes it
and congratulations on bagging PR #10000 👏
e
Heh, my proudest accomplishment
thanks for verifying! I’ll try nuking some more iml files and see if I can get to a working state 🙂
👍 1
woo! It works 😄 Thanks @Navina From the root of the Pinot project I ran
find . -name \*.iml -exec rm {} \;
, then invalidated all caches in intellij. After intellij reloaded I needed to open the
maven
tab on the right-hand side,
Unignore
all the modules (presumably, the lack of
.iml
implied to intellij that I wanted to ignore the module?), then from that same maven menu clicked
Reload all Maven Projects
. Now all is well and I can debug sans print statements 😅
👍 1