DPons97 / AdrenalinaGame-AM32

Software Engineering project 2019
2 stars 0 forks source link

jerkins fails #4

Closed ingconti closed 5 years ago

ingconti commented 5 years ago

Waiting for Jenkins to finish collecting data [ERROR] Failed to execute goal on project AM32: Could not resolve dependencies for project it.polimi.ingsw:AM32:jar:1.0-SNAPSHOT: Could not find artifact junit:junit:jar:5.4.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

Lucaz97 commented 5 years ago

I guess that trying to solve issue 3 I broke it. I changed dependency version on the pom from 4.11 to 5.4.0. It works on our machines, but for now I'm reverting it.

ingconti commented 5 years ago

we will re-recheck. in any case tomorrow we can solve in Lab.

Lucaz97 commented 5 years ago

Ok, now it should be as it was when issue #3 was opened. Does it affect tonights deadline?

ingconti commented 5 years ago

tonight we will check by HAND

-the more the marrier

Lucaz97 commented 5 years ago

Ok, we'll update the uml with the changes we did implementing the model and re-upload it. I did another change in the last commit for the junit dependencies. Thank you

ingconti commented 5 years ago

at now:

[INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [JENKINS] Recording test results[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.BuildInfoRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/

[INFO] [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ AM32 --- [INFO] Building jar: /var/jenkins_home/workspace/AM32/target/AM32-1.0-SNAPSHOT.jar

pls fix asap. ias only warning by jerkins, but fix it.

Lucaz97 commented 5 years ago

We have 33 tests... Is it normal it says 0 tests run? Checking https://jenkins.io/redirect/serialization-of-anonymous-classes/ I have not found something useful there, but it looks like other people got this warning and can't find the reason https://issues.jenkins-ci.org/browse/JENKINS-51938

keni7385 commented 5 years ago

Locally, if you run mvn clean test in the command line does it work?

I tried to run mvn clean test on your project (locally in my computer) and doesn't show the test as well. I believe the reason is because you are mixing junit 5 and 4 here: https://github.com/DPons97/ing-sw-2019-Collini-Pons-Colazzo/blob/43117fc40916ae0507c94ac4284af1b1fac33ca0/pom.xml#L26

I tried removing that dependency and adding junit-jupiter-engine one and it works:

[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running it.polimi.ingsw.AmmoCellTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 s - in it.polimi.ingsw.AmmoCellTest
[INFO] Running it.polimi.ingsw.SpawnCellTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in it.polimi.ingsw.SpawnCellTest
[INFO] Running it.polimi.ingsw.PlayerTest
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.123 s - in it.polimi.ingsw.PlayerTest
[INFO] Running it.polimi.ingsw.AdrenalinaMatchTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 s - in it.polimi.ingsw.AdrenalinaMatchTest
[INFO] Running it.polimi.ingsw.ActionTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 s - in it.polimi.ingsw.ActionTest
[INFO] Running it.polimi.ingsw.DeckTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s - in it.polimi.ingsw.DeckTest
[INFO] Running it.polimi.ingsw.AmmoTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s - in it.polimi.ingsw.AmmoTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.410 s
[INFO] Finished at: 2019-04-08T16:59:53+02:00
[INFO] ----------------------------------------------------- 

Dependencies required: junit-jupiter-api vs 5.4.1 and junit-jupiter-engine vs 5.4.1. In orther to see the reports in Intellij, you might need to add maven-surefire-plugin plugin.

Lucaz97 commented 5 years ago

Thanks. I'm giving it a try, I'll let you know.

Lucaz97 commented 5 years ago

I have updated dependencies as @keni7385 suggested and ran tests via maven project tab (prev used to return 0 tests passed) and now says 32 tests passed. It should be fine now. Thank you very much.

Lucaz97 commented 5 years ago

Did you notice any change on the server? are tests being executed now on the server? Thanks for the updates

ingconti commented 5 years ago

now it seems working.