https://pinot.apache.org/ logo
#general
Title
# general
r

Renato Marroquín Mogrovejo

08/05/2020, 9:41 PM
hi there, new user here 😄 I just cloned incubator-pinot, and I was trying to run specific tests in the following way, I am inside
incubator-pinot/pinot-controller
Copy code
mvn test -Dtest=LeadControllerManagerTest
but I get this error
Copy code
[ERROR] Failed to execute goal on project pinot-controller: Could not resolve dependencies for project org.apache.pinot:pinot-controller:jar:0.5.0-SNAPSHOT: Failed to collect dependencies at org.apache.pinot:pinot-common:jar:0.5.0-SNAPSHOT: Failed to read artifact descriptor for org.apache.pinot:pinot-common:jar:0.5.0-SNAPSHOT: Failure to find org.apache.pinot:pinot:pom:${revision}${sha1} in <https://repo.maven.apache.org/maven2> was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
any ideas what it could be?
m

Mayank

08/05/2020, 9:42 PM
Hello, did you build first?
mvn clean install -DskipTests -Pbin-dist
r

Renato Marroquín Mogrovejo

08/05/2020, 9:43 PM
I did this
Copy code
mvn install package -DskipTests -Pbin-dist -DdownloadSources -DdownloadJavadocs
or did I miss
-Pbin-dist
?
x

Xiang Fu

08/05/2020, 9:45 PM
can you run it from root
not inside the pinot-controller
m

Mayank

08/05/2020, 9:45 PM
Oh yea, i didn't notice that you were running from within the module
r

Renato Marroquín Mogrovejo

08/05/2020, 9:46 PM
building
give a few mins and I will report back 🙂 thanks!
no, it didn't work, I got this
Copy code
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project pinot-spi: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
...
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :pinot-spi
I tried running a specific test
Copy code
mvn test -Dtest=org.apache.pinot.controller.LeadControllerManagerTest
m

Mayank

08/05/2020, 9:53 PM
Set -DfailIfNoTests=false to ignore this error.)
r

Renato Marroquín Mogrovejo

08/05/2020, 9:57 PM
thanks! with
-DfailIfNoTests=false
worked, but it ended up building the entire project 🤔
Copy code
[INFO] Pinot .............................................. SUCCESS [  2.615 s]
[INFO] Pinot Service Provider Interface ................... SUCCESS [  0.816 s]
[INFO] Pinot Common ....................................... SUCCESS [  5.578 s]
[INFO] Pinot Plugins ...................................... SUCCESS [  0.329 s]
[INFO] Pinot Input Format ................................. SUCCESS [  0.190 s]
[INFO] Pinot Avro Base .................................... SUCCESS [  0.151 s]
how do you guys run specific unit tests?
m

Mayank

08/05/2020, 9:57 PM
From IDE is one way
r

Renato Marroquín Mogrovejo

08/05/2020, 10:00 PM
ok that might be way easier 😅 I imported incubator-pinot into intellj but tests don't seem to be recognized
x

Xiang Fu

08/05/2020, 10:00 PM
the issue is we are using
<version>${revision}${sha1}</version>
in pom version
r

Renato Marroquín Mogrovejo

08/05/2020, 10:00 PM
that is why the entire project gets rebuilt?
x

Xiang Fu

08/05/2020, 10:00 PM
which prevent running build from each component
r

Renato Marroquín Mogrovejo

08/05/2020, 10:01 PM
I see, yeah then running specific unit tests from cmd line would not be ideal
x

Xiang Fu

08/05/2020, 10:01 PM
I somehow feel we should change it back to fixed version @Mayank
r

Renato Marroquín Mogrovejo

08/05/2020, 10:03 PM
I mean what is the advantage of using
Copy code
<version>${revision}${sha1}</version>
? if you guys are doing the release periodically, then those could change accordingly, and the
sha1
verification could be done when submitting release candidates
x

Xiang Fu

08/05/2020, 10:04 PM
we are using maven release for that
if you replace
<version>${revision}${sha1}</version>
with
<version>0.5.0-SNAPSHOT</version>
, then you should be able to build/test in child component
👍 1
r

Renato Marroquín Mogrovejo

08/05/2020, 10:06 PM
just out of curiosity, what is the advantage of using
Copy code
<version>${revision}${sha1}</version>
?
also is there a specific IDE conf for intellj for it to recognize unit tests? I keep on seeing them as non-executable 😞
m

Mayank

08/05/2020, 10:16 PM
Hmm, that should not happen.
mvn idea:idea?