are people able to run `AbstractJdbcSourceStandard...
# contributing-to-airbyte
d
are people able to run
AbstractJdbcSourceStandardTest
in their intellij? works for me on gradle but not in intellij
u
it’s trying to find a non-existent path on intelilj e.g.
file:/Users/davinchia/.m2/repository/org/junit/platform/junit-platform-commons/1.4.2/junit-platform-commons-1.4.2.jar!/META-INF/versions/9
does not exist
u
vs gradle
/Users/davinchia/code/airbyte/airbyte-integrations/connectors/source-jdbc/build/classes/java/test
u
already tried setting the test’s module directory; no luck. what am I missing?
u
this is coming from the
writeResource
method in the
MoreResources
class
u
I ended up modifying the method to write to a file in the
tmp
directory instead of using the classloader for now. This seems better since with the classloader, there is no guarantee the class is being loaded from a location that can be written to. In the above example, my intellij is loading classes from within the
junit-platform-commons
jar, thus the funky
!
in the path
u
I’m still curious what others think about this
u
works for me in intellij
u
are you using a custom run configuration somehow?
u
I don’t have a
~/.m2/repository/org/junit/platform/junit-platform-commons/1.4.2/
directory
u
Or maybe it’s accidental additions from command-entering a test dependency only at the intellij level?
u
Weird
u
Can you screen shot your intellij test config for me?
u
I’m trying to run the abstract jdbc source test
u
watch this work once I restart my intellij
u
otherwise known as schrodinger’s class path
u
this is still not working for me ugh
u
Jared, what’s your working dir?
u
the root airbyte directory
u
I have absolutely nothing unique configured in my project
u
Very intentionally
u
I would be that if you created a new project from scratch in the airbyte dir and ran it the test would work
u
I don’t think I have anything special configured as well..
u
What about the module config?
u
Also, do you have any non-“Gradle: ” libraries in the Libraries section?
u
My dependencies tab looks similar. My Sources tab has one extra folder
u
Also, do you have any non-“Gradle: ” libraries in the Libraries section?
Nope. Only see Gradle
u
what about the specific dep
u
I’m on Ultimate 2020.3.3
u
I’m on the same version
u
looks similar
u
is your M2 cache populated?
u
Are we still using local cache in this gradle set up? wondering what will happen if I blow my local cache away
u
Copy code
→ ll ~/.m2/repository/org/junit/
ls: /Users/jrhizor/.m2/repository/org/junit/: No such file or directory
u
I’m not sure why it’s looking for your maven cache in a gradle project
u
I remember it’s possible to configure gradle to use the local maven cache. don’t think we are doing it though
u
so not sure why too
u
if you ./gradlew clean does it help anything?
u
what does
ll ~/.m2
show for you?
u
Copy code
# jrhizor in ~ [16:22:08]
→ ll ~/.m2/repository/org/
total 0
drwxr-xr-x  9 jrhizor  staff   288B Aug 21  2019 apache
drwxr-xr-x  4 jrhizor  staff   128B Aug 21  2019 beanshell
drwxr-xr-x  3 jrhizor  staff    96B Aug 21  2019 checkerframework
drwxr-xr-x  5 jrhizor  staff   160B Aug 21  2019 codehaus
drwxr-xr-x  4 jrhizor  staff   128B Aug 21  2019 hamcrest
drwxr-xr-x  5 jrhizor  staff   160B Aug 13  2020 jetbrains
drwxr-xr-x  6 jrhizor  staff   192B Aug 21  2019 slf4j
drwxr-xr-x  8 jrhizor  staff   256B Aug 21  2019 sonatype

# jrhizor in ~ [16:22:10]
→ ll ~/.m2/
total 0
drwxr-xr-x  18 jrhizor  staff   576B Aug 21  2019 repository
drwxr-xr-x   3 jrhizor  staff    96B Aug 21  2019 wrapper
u
I have some stuff in there but very little
u
ah
u
it’s my intellij that’s populating/referencing the maven directory
u
after removing the
junit
dir, Intellij lets me know it has to redownload it
u
I think it’s because I’m using
intellij
to run the tests
u
does that fix the original problem?
u
no it doesn’t
u
oh actually
u
there’s a difference in that page
u
I have it running through Gradle, not intellij
u
for both build and run and test
u
that’s my guess
u
if you switch to Intellij, does this happen to you too?
u
I get
java: error: invalid flag: -Xmx2g
u
I think I’d have to change some other things to get it to work
u
huh
u
if I switch back now it shows me your original error
u
oh but that was on the old run config
u
switching back to the default test run config works again
u
ah okay so this breaks if running the test with
intellij
then?
u
it didn’t break the same way as you
u
but it broke the same way as you if I set it to run as gradle but ran it with configuration from when it was configured to run as intellij
u
🤷‍♂️
u
I see
u
which I don’t think is a very useful signal unfortunately
u
have you been running test in
gradle
this entire time? I prefer
intellij
since logging is better
u
yeah I’ve been running it through gradle the whole time
u
generally logging seems ok
u
u
Is this the only situation you’ve run into this kind of problem?
u
afaict this method is only used in testing so I think it’s a safer bet to write to a permanent location instead of something that changes depending on how classes are loaded
u
writeResource
is only used for testing it looks like
u
haha jinx
u
haha
u
yeah that change should be fine
u
is the intellij running actually nicer for you in general?
u
if this is fixed maybe i shoudl try switching
u
yeah
u
I find it faster
u
and the logs are cleaner
u
cool I’ll put up a PR later
u
cool
u
thanks for looking into this with me!
u
ha np. wish I could have been more useful