This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Conversation

mpeddada1

Running mvn test -Dtest=com.google.cloud.spanner.connection.it.ITBulkConnectionTest -Pnative -DfailIfNoTests=false results in the following message:

 JUnit Vintage:ITBulkConnectionTest:testBulkCreateConnectionsSingleThreaded
    MethodSource [className = 'com.google.cloud.spanner.connection.it.ITBulkConnectionTest', methodName = 'testBulkCreateConnectionsSingleThreaded', methodParameterTypes = '']
    => java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.spanner.connection.AbstractStatementParser
       com.google.cloud.spanner.connection.ConnectionImpl.getStatementParser(ConnectionImpl.java:272)
       com.google.cloud.spanner.connection.ConnectionImpl.parseAndExecuteQuery(ConnectionImpl.java:893)
       com.google.cloud.spanner.connection.ConnectionImpl.executeQuery(ConnectionImpl.java:870)
       com.google.cloud.spanner.connection.it.ITBulkConnectionTest.testBulkCreateConnectionsSingleThreaded(ITBulkConnectionTest.java:54)
       java.lang.reflect.Method.invoke(Method.java:566)
       org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
       org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
       org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
       org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
       org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
       [...]

In order to fix this, we need to register a couple of classes for reflection.

@mpeddada1mpeddada1 marked this pull request as ready for review March 15, 2022 17:21
@mpeddada1mpeddada1 requested a review from a team as a code owner March 15, 2022 17:21
@mpeddada1mpeddada1 merged commit 257de0f into main Mar 16, 2022
@mpeddada1mpeddada1 deleted the fix-spanner-test branch March 16, 2022 16:43
@release-pleaserelease-please bot mentioned this pull request Mar 16, 2022
Sign up for free to subscribe to this conversation on . Already have an account? Sign in.
None yet
None yet

Successfully merging this pull request may close these issues.