0

I have just downloaded jsonix and when I run maven it fails its built-in tests, with the following error:

FAILURES: 2/898 assertions failed (332ms)
npm ERR! Test failed.  See above for more details.

    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary for Jsonix 2.4.2-SNAPSHOT:
    [INFO] 
    [INFO] Jsonix ............................................. SUCCESS [  0.698 s]
    [INFO] Jsonix Scripts ..................................... SUCCESS [  9.933 s]
    [INFO] Jsonix Node.js ..................................... SUCCESS [  0.014 s]
    [INFO] Jsonix Node.js Scripts ............................. FAILURE [  4.296 s]
    [INFO] Jsonix Node.js Tests ............................... SKIPPED
...etc other skipped tests omitted
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE

I really don't know my way around maven very well, and despite the "see above for more details" message, I don't actually see any details that can help me debug this.

Any suggestions on how to debug or fix this would be much appreciated.

Duncan
  • 507
  • 3
  • 14

1 Answers1

1

Please use Jsonix issue tracker to ask project-specific question.

Check pom.xml of the failing scripts module:

                    <execution>
                        <id>npm-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>npm</executable>
                            <arguments>
                                <argument>test</argument>
                            </arguments>
                        </configuration>
                    </execution>

So apparenty Maven simply executes npm test in the test phase. You can, too:

jsonix/nodejs/scripts> npm test
> jsonix@2.4.2-SNAPSHOT test ...\jsonix\nodejs\scripts
> nodeunit tests/tests.js
...
√ Jsonix - Issues - Issues - GH96 - Standard - Roundtrips - test_any.xml
Testing [...\jsonix\nodejs\scripts\tests\GH96/test_any].
√ Jsonix - Issues - Issues - GH96 - Standard - Comparisons - test_any.xml
√ Jsonix - Issues - Issues - GH111 - MarshallsWithPrefix
√ Jsonix - Issues - Issues - GH135 - A_B
√ Jsonix - Issues - Issues - GH135 - B_A
√ Jsonix - Issues - Issues - GH141 - DurationP
√ Jsonix - Issues - Issues - GH150 - A_B
√ Jsonix - Issues - Issues - GH150 - B_A

OK: 898 assertions (696ms)

If some tests are failing you can redirect the output to files (npm test >std.log 2>err.log) and check which tests are failing.

Please file issues so this will be fixed.

At the moment I can't reproduce this, the build is green on my local machine.

Disclaimer: I'm the author of Jsonix.

lexicore
  • 42,748
  • 17
  • 132
  • 221