[JVM] java.lang.IndexOutOfBoundsException

766 views
Skip to first unread message

Robert

unread,
Mar 20, 2013, 7:35:17 PM3/20/13
to cu...@googlegroups.com
I'm using cucumber-jvm 1.1.3 and for some reason each time I run a test that worked fine under 1.1.2, I get an IndexOutOfBoundsException.  The series of tests I'm running are based on the basic_arithmetic.feature located within the cucumber-jvm examples package (I basically copied the feature file and necessary java files to my demo project).  This appears to be a regression error. Is anyone else seeing this with version 1.1.3 ?

Output from console

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.stag.simple.SimpleTest

Feature: Basic Arithmetic

  Background: A Calculator              # features/basic_arithmetic.feature:3
    Given a calculator I just turned on # RpnCalculatorStepdefs.a_calculator_I_just_turned_on()

  Scenario: Addition   # features/basic_arithmetic.feature:6
    # Try to change one of the values below to provoke a failure
    When I add 4 and 5 # RpnCalculatorStepdefs.adding(int,int)
    Then the result is 9Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.509 sec <<< FAILURE!

Results :

Tests in error: 
  Feature: Basic Arithmetic: Index: 0, Size: 0

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

[ERROR] There are test failures.

Exception

-------------------------------------------------------------------------------
Test set: org.stag.simple.SimpleTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.509 sec <<< FAILURE!
Feature: Basic Arithmetic  Time elapsed: 0.006 sec  <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.remove(ArrayList.java:387)
at gherkin.formatter.PrettyFormatter.indentedLocation(PrettyFormatter.java:142)
at gherkin.formatter.PrettyFormatter.printStep(PrettyFormatter.java:255)
at gherkin.formatter.PrettyFormatter.result(PrettyFormatter.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cucumber.runtime.Utils$1.call(Utils.java:44)
at cucumber.runtime.Timeout.timeout(Timeout.java:12)
at cucumber.runtime.Utils.invoke(Utils.java:40)
at cucumber.runtime.RuntimeOptions$2.invoke(RuntimeOptions.java:138)
at $Proxy11.result(Unknown Source)
at cucumber.runtime.junit.JUnitReporter.result(JUnitReporter.java:99)
at cucumber.runtime.Runtime.runStep(Runtime.java:280)
at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:49)
at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:43)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:36)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:83)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:77)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at cucumber.api.junit.Cucumber.run(Cucumber.java:82)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)


Aslak Hellesøy

unread,
Mar 21, 2013, 1:49:30 AM3/21/13
to cu...@googlegroups.com

On Wednesday, 20 March 2013 at 23:35, Robert wrote:

I'm using cucumber-jvm 1.1.3 and for some reason each time I run a test that worked fine under 1.1.2, I get an IndexOutOfBoundsException.  The series of tests I'm running are based on the basic_arithmetic.feature located within the cucumber-jvm examples package (I basically copied the feature file and necessary java files to my demo project).  This appears to be a regression error. Is anyone else seeing this with version 1.1.3 ?

Could you create an issue in the cucumber-jvm issue tracker please?

Thanks!

Aslak
--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robert

unread,
Mar 21, 2013, 12:52:22 PM3/21/13
to cu...@googlegroups.com
Sure. I'll go ahead and do that.

Robert

unread,
Mar 21, 2013, 9:33:28 PM3/21/13
to cu...@googlegroups.com
Aslak,


On Wednesday, March 20, 2013 10:49:30 PM UTC-7, Aslak Hellesøy wrote:

On Wednesday, 20 March 2013 at 23:35, Robert wrote:

I'm using cucumber-jvm 1.1.3 and for some reason each time I run a test that worked fine under 1.1.2, I get an IndexOutOfBoundsException.  The series of tests I'm running are based on the basic_arithmetic.feature located within the cucumber-jvm examples package (I basically copied the feature file and necessary java files to my demo project).  This appears to be a regression error. Is anyone else seeing this with version 1.1.3 ?

Could you create an issue in the cucumber-jvm issue tracker please?

Thanks!

Aslak


Reply all
Reply to author
Forward
0 new messages