mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.39k stars 529 forks source link

mvn package failed on test com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest #85

Closed riywo closed 10 years ago

riywo commented 11 years ago

I tried just following the instruction in the README, but mvn package failed on test phase. Any idea?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:   precise

$ mvn package -X
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-40-virtual", arch: "amd64", family: "unix"

(snip)

Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE!
JobScheduler should::A job creates a failed task and then a successful task from a synchronous job(com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest)  Time elapsed: 0.001 sec  <<< FAILURE!
org.specs2.reporter.JUnitReporter$$anon$1: '0' is not equal to '1' expected:<[1]> but was:<[0]>
    at com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest$$anonfun$1$$anonfun$apply$19.apply(JobSchedulerIntegrationTest.scala:31)
    at com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest$$anonfun$1$$anonfun$apply$19.apply(JobSchedulerIntegrationTest.scala:14)

Results :

Failed tests:
   '0' is not equal to '1' expected:<[1]> but was:<[0]>

Tests run: 36, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.246s
[INFO] Finished at: Tue Aug 06 03:00:15 UTC 2013
[INFO] Final Memory: 19M/314M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project chronos: There are test failures.
[ERROR]
[ERROR] Please refer to /home/ubuntu/chronos/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
riywo commented 11 years ago
$ tail -n +1 target/surefire-reports/*.txt
==> target/surefire-reports/com.airbnb.scheduler.api.SerDeTest.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.api.SerDeTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.117 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.graph.JobGraphSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.graph.JobGraphSpec
-------------------------------------------------------------------------------
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.24 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.Iso8601ExpressionParserSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.Iso8601ExpressionParserSpec
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.057 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec <<< FAILURE!
JobScheduler should::A job creates a failed task and then a successful task from a synchronous job(com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest)  Time elapsed: 0.04 sec  <<< FAILURE!
org.specs2.reporter.JUnitReporter$$anon$1: '0' is not equal to '1' expected:<[1]> but was:<[0]>
    at com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest$$anonfun$1$$anonfun$apply$19.apply(JobSchedulerIntegrationTest.scala:31)
    at com.airbnb.scheduler.jobs.JobSchedulerIntegrationTest$$anonfun$1$$anonfun$apply$19.apply(JobSchedulerIntegrationTest.scala:14)

==> target/surefire-reports/com.airbnb.scheduler.jobs.JobSchedulerSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.JobSchedulerSpec
-------------------------------------------------------------------------------
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.746 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.JobUtilsSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.JobUtilsSpec
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.296 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.ScheduleStreamSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.ScheduleStreamSpec
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.132 sec

==> target/surefire-reports/com.airbnb.scheduler.jobs.TaskManagerSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.jobs.TaskManagerSpec
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 sec

==> target/surefire-reports/com.airbnb.scheduler.state.PersistenceStoreSpec.txt <==
-------------------------------------------------------------------------------
Test set: com.airbnb.scheduler.state.PersistenceStoreSpec
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.393 sec
riywo commented 11 years ago
$ java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
riywo commented 11 years ago

After I remove ~/.m2 directory, I can build it. Weird...

c4ssio commented 11 years ago

Thanks for this, riywo! Turns out I needed to roll back my maven version to 3.0.5. I also removed my ~/.m2 folder and got it to run. I'm packaging all of this into a cap script and trying again.

florianleibert commented 11 years ago

There is an issue with OpenJDK. I think it has to do with the mock tests and compiler optimization. This helps on OpenJDK for now "-Dmaven.test.skip=true"

florianleibert commented 10 years ago

I'm closing this - it should no longer be an issue.