Jean-Baptiste Onofré created BEAM-2379:
------------------------------------------

             Summary: SpannerIO tests are failing
                 Key: BEAM-2379
                 URL: https://issues.apache.org/jira/browse/BEAM-2379
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-extensions
            Reporter: Jean-Baptiste Onofré
            Assignee: Davor Bonaci


When performing a complete {{mvn clean install}}, the build is failing on 
{{SpannerIO}} tests:

{code}
[ERROR] Errors: 
[ERROR]   SpannerIOTest.batching:129 » UserCode 
java.lang.IllegalArgumentException: A pr...
[ERROR]   SpannerIOTest.batchingGroups:155 » UserCode 
java.lang.IllegalArgumentException...
[ERROR]   SpannerIOTest.noBatching:178 » UserCode 
java.lang.IllegalArgumentException: A ...
[ERROR]   SpannerIOTest.singleMutationPipeline » UncheckedExecution 
org.apache.beam.sdk....
{code}

These tests fail with the same reason, here's the complete stack trace:

{code}
[ERROR] batchingGroups(org.apache.beam.sdk.io.gcp.spanner.SpannerIOTest)  Time 
elapsed: 0.004 s  <<< ERROR!
org.apache.beam.sdk.util.UserCodeException: java.lang.IllegalArgumentException: 
A project ID is required for this service but could not be determined from the 
builder or the environment.  Please set a project ID using the builder.
        at 
org.apache.beam.sdk.util.UserCodeException.wrap(UserCodeException.java:36)
        at 
org.apache.beam.sdk.io.gcp.spanner.SpannerIO$SpannerWriteFn$DoFnInvoker.invokeSetup(Unknown
 Source)
        at 
org.apache.beam.sdk.transforms.DoFnTester.initializeState(DoFnTester.java:745)
        at 
org.apache.beam.sdk.transforms.DoFnTester.startBundle(DoFnTester.java:219)
        at 
org.apache.beam.sdk.transforms.DoFnTester.processBundle(DoFnTester.java:183)
        at 
org.apache.beam.sdk.io.gcp.spanner.SpannerIOTest.batchingGroups(SpannerIOTest.java:155)
        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.apache.beam.sdk.testing.TestPipeline$1.evaluate(TestPipeline.java:321)
        at 
org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        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.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        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.junitcore.JUnitCore.run(JUnitCore.java:55)
        at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
        at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
        at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
        at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
        at 
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:157)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)
Caused by: java.lang.IllegalArgumentException: A project ID is required for 
this service but could not be determined from the builder or the environment.  
Please set a project ID using the builder.
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
        at com.google.cloud.ServiceOptions.<init>(ServiceOptions.java:238)
        at 
com.google.cloud.spanner.SpannerOptions.<init>(SpannerOptions.java:81)
        at 
com.google.cloud.spanner.SpannerOptions.<init>(SpannerOptions.java:43)
        at 
com.google.cloud.spanner.SpannerOptions$Builder.build(SpannerOptions.java:180)
        at 
org.apache.beam.sdk.io.gcp.spanner.SpannerIO$Write.getSpannerOptions(SpannerIO.java:157)
        at 
org.apache.beam.sdk.io.gcp.spanner.SpannerIO$SpannerWriteFn.setup(SpannerIO.java:262)
{code}

The project ID is not correctly set and so the precondition is not satisfied.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to