Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test errors seem to prevent successful build #16

Closed
douglundin opened this issue Apr 29, 2022 · 2 comments
Closed

Test errors seem to prevent successful build #16

douglundin opened this issue Apr 29, 2022 · 2 comments

Comments

@douglundin
Copy link

Test errors seem to prevent successful build. No changes to package after downloading and opening it into IntelliJ using JDK 11 & 17.

Here's the log

douglundin$ mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for edu.uoc.elc.lti:lti-13:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 76, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------------------< edu.uoc.elc.lti:lti-13 >-----------------------
[INFO] Building edu.uoc.elc.lti:lti-13 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lti-13 ---
[INFO] Deleting /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lti-13 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ lti-13 ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 49 source files to /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/target/classes
[WARNING] /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/main/java/edu/uoc/elc/lti/tool/validator/LTICoreValidator.java: Some input files use unchecked or unsafe operations.
[WARNING] /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/main/java/edu/uoc/elc/lti/tool/validator/LTICoreValidator.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lti-13 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 35 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ lti-13 ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 15 source files to /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/target/test-classes
[WARNING] /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/test/java/edu/uoc/lti/jwt/claims/TestLaunchLoader.java: /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/test/java/edu/uoc/lti/jwt/claims/TestLaunchLoader.java uses unchecked or unsafe operations.
[WARNING] /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/src/test/java/edu/uoc/lti/jwt/claims/TestLaunchLoader.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ lti-13 ---
[INFO] Surefire report directory: /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/target/surefire-reports

T E S T S
Running edu.uoc.elc.lti.platform.ags.ScoreTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.073 sec
Running edu.uoc.elc.lti.platform.accesstoken.AccessTokenRequestHandlerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.804 sec
Running edu.uoc.elc.lti.platform.deeplinking.FileItemValidatorTest
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.278 sec <<< FAILURE!
isValidEmpty(edu.uoc.elc.lti.platform.deeplinking.FileItemValidatorTest) Time elapsed: 0.002 sec <<< ERROR!
java.lang.NullPointerException
at edu.uoc.elc.lti.platform.deeplinking.FileItemValidator.mediaTypeIsValid(FileItemValidator.java:36)
at edu.uoc.elc.lti.platform.deeplinking.FileItemValidator.fileItemIsValid(FileItemValidator.java:27)
at edu.uoc.elc.lti.platform.deeplinking.FileItemValidator.isValid(FileItemValidator.java:22)
at edu.uoc.elc.lti.platform.deeplinking.FileItemValidatorTest.isValidEmpty(FileItemValidatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running edu.uoc.elc.lti.platform.deeplinking.LtiResourceItemValidatorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running edu.uoc.elc.lti.platform.deeplinking.content.ItemTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec
Running edu.uoc.elc.lti.platform.deeplinking.content.LinkItemTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running edu.uoc.elc.lti.platform.deeplinking.content.LtiResourceItemTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running edu.uoc.elc.lti.platform.deeplinking.LinkItemValidatorTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running edu.uoc.elc.lti.platform.deeplinking.ItemValidatorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec
Running edu.uoc.elc.lti.platform.deeplinking.DeepLinkingClientTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec
Running edu.uoc.elc.lti.tool.ToolTest
com.auth0.jwk.SigningKeyNotFoundException: No key found in https://lti-ri.imsglobal.org/platforms/2647/platform_keys/2449.json with kid imstester_66067
at com.auth0.jwk.UrlJwkProvider.get(UrlJwkProvider.java:174)
at edu.uoc.lti.jwt.LtiSigningKeyResolver.resolveSigningKey(LtiSigningKeyResolver.java:34)
at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:376)
at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:550)
at io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:610)
at io.jsonwebtoken.impl.ImmutableJwtParser.parseClaimsJws(ImmutableJwtParser.java:173)
at edu.uoc.lti.jwt.claims.JWSClaimAccessor.decode(JWSClaimAccessor.java:43)
at edu.uoc.elc.lti.tool.AuthenticationResponseValidator.validate(AuthenticationResponseValidator.java:35)
at edu.uoc.elc.lti.tool.LaunchValidator.validate(LaunchValidator.java:33)
at edu.uoc.elc.lti.tool.Tool.validate(Tool.java:68)
at edu.uoc.elc.lti.tool.ToolTest.validateLaunch(ToolTest.java:166)
at edu.uoc.elc.lti.tool.ToolTest.assertLaunch(ToolTest.java:160)
at edu.uoc.elc.lti.tool.ToolTest.assertLaunches(ToolTest.java:146)
at edu.uoc.elc.lti.tool.ToolTest.validateInvalidLtiLaunchesMustReturnFalse(ToolTest.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.244 sec
Running edu.uoc.elc.lti.tool.deeplinking.SettingsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Results :

Tests in error:
isValidEmpty(edu.uoc.elc.lti.platform.deeplinking.FileItemValidatorTest)

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.119 s
[INFO] Finished at: 2022-04-29T09:09:36-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project lti-13: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/douglundin/IdeaProjects/D2L-LTI/UOC/java-lti-1.3/target/surefire-reports for the individual test results.
[ERROR] -> [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.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Dougs-MacBook-Pro:java-lti-1.3 douglundin$

@Adito5393
Copy link
Contributor

Have you seen PR #5 ?

@xaviaracil
Copy link
Contributor

Fixed bug in edu.uoc.elc.lti.platform.deeplinking.FileItemValidator when accepted media types is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants