Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-410

JsonItemReaderTest failed to read test input data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0.Final
    • 1.3.0.Beta7
    • tests
    • None

      when running in CI, JsonItemReaderTest failed to read from github.com test data (these tests passed when running in local environment):

      java.lang.AssertionError: expected:<COMPLETED> but was:<FAILED>
          at org.junit.Assert.fail(Assert.java:88)
          at org.junit.Assert.failNotEquals(Assert.java:834)
          at org.junit.Assert.assertEquals(Assert.java:118)
          at org.junit.Assert.assertEquals(Assert.java:144)
          at org.jberet.support.io.JsonItemReaderTest.testReadWrite0(JsonItemReaderTest.java:218)
          at org.jberet.support.io.JsonItemReaderTest.testBeanTypeGithubJson1(JsonItemReaderTest.java:89)
          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.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:365)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
          at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
      ------- Stdout: -------
      Use randomly picked writeMode append
      ------- Stderr: -------
      May 08, 2018 11:14:47 AM org.jberet.tools.AbstractJobXmlResolver resolveJobXml
      INFO: JBERET000030: Resolved job file:/store/work/tc-work/bc898d1fe1eec64/jberet-support/target/test-classes/META-INF/batch-jobs/org.jberet.support.io.JsonItemReaderTest.xml
      May 08, 2018 11:14:48 AM org.jberet.runtime.runner.ChunkRunner run
      ERROR: item-count=100, time-limit=0, skip-limit=-1, skipCount=0, retry-limit=-1, retryCount=0
      May 08, 2018 11:14:48 AM org.jberet.runtime.runner.ChunkRunner run
      ERROR: JBERET000007: Failed to run job org.jberet.support.io.JsonItemReaderTest, org.jberet.support.io.JsonItemReaderTest.step1, org.jberet.job.model.Chunk@5caed9
      javax.batch.operations.BatchRuntimeException: JBERET060004: Failed to open stream from resource: https://api.github.com/users/chengfang/repos
          at org.jberet.support.io.ItemReaderWriterBase.getInputStream(ItemReaderWriterBase.java:163)
          at org.jberet.support.io.JsonItemReader.configureJsonParser(JsonItemReader.java:198)
          at org.jberet.support.io.JsonItemReader.open(JsonItemReader.java:138)
          at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:197)
          at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:225)
          at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:144)
          at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
          at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
          at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
          at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.github.com/users/chengfang/repos
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
          at java.net.URL.openStream(URL.java:1045)
          at org.jberet.support.io.ItemReaderWriterBase.getInputStream(ItemReaderWriterBase.java:137)
          ... 12 more
      
      

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: