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

Fix mvn test failure from protoc-jar module with FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe #29

Open
ee08b397 opened this issue Jul 8, 2024 · 0 comments

Comments

@ee08b397
Copy link

ee08b397 commented Jul 8, 2024

Describe the bug
When running JUnit tests with mvn test, the build failed because the protoc *.exe file is missing from the protoc-jar module. The reason is the packaging didn't happen.

java.lang.AssertionError: test.properties must be preset on test classpath, see https://github.com/takari/takari-plugin-testing-project/blob/master/testproperties.md for me details
    at org.junit.Assert.fail(Assert.java:89)
    at org.junit.Assert.assertTrue(Assert.java:42)
    at org.junit.Assert.assertNotNull(Assert.java:713)
    at io.takari.maven.testing.TestProperties.loadProperties(TestProperties.java:59)
    at io.takari.maven.testing.TestProperties.<init>(TestProperties.java:50)

Btw, looks like "for me details" should be "for more details".

Run Mvn test

[ERROR] io.github.blackrock.protocjar.ProtocTest.testRunProtocCompileShade -- Time elapsed: 0.204 s <<< ERROR!
java.io.FileNotFoundException: Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:223)
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:184)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:68)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:55)
	at io.github.blackrock.protocjar.ProtocTest.testRunProtocCompileShade(ProtocTest.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

[ERROR] io.github.blackrock.protocjar.ProtocTest.testStdTypes -- Time elapsed: 0.250 s <<< ERROR!
java.io.FileNotFoundException: Unsupported platform: protoc-2.6.1-osx-aarch_64.exe
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:223)
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:184)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:68)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:55)
	at io.github.blackrock.protocjar.ProtocTest.testStdTypes(ProtocTest.java:82)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   MavenUtilTest.testParseSnapshotExeName:60 expected: <protoc-2.4.1-20180823.052533-7-osx-x86_64.exe> but was: <null>
[ERROR] Errors:
[ERROR]   ProtocTest.testRunProtocBasic:36 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocCompile:99 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocCompileShade:119 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocDownloadArtifact:67 » FileNotFound https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-osx-aarch_64.exe
[ERROR]   ProtocTest.testStdTypes:82 » FileNotFound Unsupported platform: protoc-2.6.1-osx-aarch_64.exe
[INFO]
[ERROR] Tests run: 9, Failures: 1, Errors: 5, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for protoc-jar-maven-plugin 2.0-SNAPSHOT:
[INFO]
[INFO] protoc-jar-maven-plugin ............................ SUCCESS [  0.001 s]
[INFO] protoc-jar ......................................... FAILURE [  2.574 s]
[INFO] maven-plugin ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.927 s
[INFO] Finished at: 2024-06-28T18:10:30-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project protoc-jar: There are test failures.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout the lastest code.
  2. Run mvn test

Expected behavior
Move the maven-assembly-plugin from the package phase to test phase.

Environment (please complete the following information):

  • Operating System: MacOS
  • Great Expectations Version: [e.g. 0.13.2]
@ee08b397 ee08b397 mentioned this issue Jul 8, 2024
9 tasks
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

1 participant