Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-297

BrokenNQueensBenchmarkTest: this valid test pollutes the log with a stacktrace

XMLWordPrintable

    • Hide

      /optaplanner-distribution-6.2.0.CR4/examples/sources$ mvn clean test > mvnrun.txt
      or
      in eclipse select the project, then select run as -> maven test

      Show
      /optaplanner-distribution-6.2.0.CR4/examples/sources$ mvn clean test > mvnrun.txt or in eclipse select the project, then select run as -> maven test

      There is an IllegalStateException in the BrokenNQueensBenchmarkTest. The error is:
      "The entityClass (class org.optaplanner.examples.nqueens.domain.Row) has been specified as a planning entity in the configuration, but does not have a PlanningEntity annotation."

      Note that the error is being pushed to report instead of failing the build. MVN Log:
      [INFO] — maven-enforcer-plugin:1.2:enforce (enforce-direct-dependencies) @ optaplanner-examples —
      [INFO] Flag 'reportOnly' is set. Exceptions from rule will only be reported!

      I'm going to try fixing the exception, but if you don't see a patch up in a week assume that I've gotten distracted.

      Note that the forum reference is to an exception in the same area of the examples, but it isn't quite the same.

      ====snip from mvn execution sowing exception====
      Running org.optaplanner.examples.nqueens.app.BrokenNQueensBenchmarkTest
      2015-03-01 16:32:10,037 [Thread-20] INFO  Benchmarking started: solverBenchmarkResultList size (5), parallelBenchmarkCount (4).
      2015-03-01 16:32:10,052 [Thread-20] ERROR The singleBenchmarkRunner (8queens_First Fit Decreasing) failed.
      java.lang.IllegalStateException: The entityClass (class org.optaplanner.examples.nqueens.domain.Row) has been specified as a planning entity in the configuration, but does not have a PlanningEntity annotation.
          at org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.processEntityAnnotations(EntityDescriptor.java:96) ~[optaplanner-core-6.2.0.CR4.jar:6.2.0.CR4]
          at org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.processAnnotations(EntityDescriptor.java:88) ~[optaplanner-core-6.2.0.CR4.jar:6.2.0.CR4]
          at org.optaplanner.core.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:237) ~[optaplanner-core-6.2.0.CR4.jar:6.2.0.CR4]
          at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:182) ~[optaplanner-core-6.2.0.CR4.jar:6.2.0.CR4]
          at org.optaplanner.benchmark.impl.SingleBenchmarkRunner.call(SingleBenchmarkRunner.java:76) ~[optaplanner-benchmark-6.2.0.CR4.jar:6.2.0.CR4]
          at org.optaplanner.benchmark.impl.SingleBenchmarkRunner.call(SingleBenchmarkRunner.java:33) ~[optaplanner-benchmark-6.2.0.CR4.jar:6.2.0.CR4]
          at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_31]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_31]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_31]
          at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_31]
      ...
      2015-03-01 16:32:10,449 [Thread-20] INFO  Benchmarking failed: time spent (25), failureCount (5), statistic html overview (/home/[username_redacted]/workspaces/optaplanner-distribution-6.2.0.CR4/examples/sources/target/test/data/nqueens/2015-03-01_163210/index.html).
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.428 sec - in org.optaplanner.examples.nqueens.app.BrokenNQueensBenchmarkTest
      

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            listerine_jira Mike Fauzy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: