Error when trying to run jbehave with maven 3 (RejectedExecutionException)

懵懂的女人 提交于 2019-12-11 10:43:47

问题


I am trying JBehave and I need to run my 3 stories (each story has more or less 2 scenarios (testCases -> Given/When/Then)) using maven.

When I run mvn integration-test I have the following exception

[ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0.5:run-stories-as-embeddables (run-stories-as-embeddables) on project bds: Failed to run stories as embeddables: Failures in running embeddables:
[ERROR] com.etermax.bds.test.stories.scenarios.RegisterContentScenarios: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@77c7bb87 rejected from java.util.concurrent.ThreadPoolExecutor@7cc8d976[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
[ERROR] com.etermax.bds.test.stories.scenarios.GenerateReportScenarios: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@56999414 rejected from java.util.concurrent.ThreadPoolExecutor@7cc8d976[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]

My POM configuration is:

<plugin>
            <groupId>org.jbehave</groupId>
            <artifactId>jbehave-maven-plugin</artifactId>
            <version>4.0.5</version>
            <dependencies>
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>1.2.16</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>run-stories-as-embeddables</id>
                    <phase>integration-test</phase>
                    <configuration>

                        <includes>
                            <include>**/GenerateReportScenarios.java</include>
                            <include>**/DeleteReportScenarios.java</include>
                            <include>**/RegisterContentScenarios.java</include>
                        </includes>
                        <scope>test</scope>

                        <systemProperties>
                            <property>
                                <name>java.awt.headless</name>
                                <value>true</value>
                            </property>
                        </systemProperties>
                        <batch>true</batch>
                        <ignoreFailureInStories>false</ignoreFailureInStories>
                        <ignoreFailureInView>true</ignoreFailureInView>
                    </configuration>
                    <goals>
                        <goal>run-stories-as-embeddables</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>           

But if I run one story (for instance, if I include only GenerateReportScenarios.java) the execution was successfully... I don't understand what is wrong when I run the 3 stories together

Can everyone help me on this issue?

Thanks.-


回答1:


I have the same exception, I removed the

< scope> test < /scope >

line and now it's working.



来源:https://stackoverflow.com/questions/35778847/error-when-trying-to-run-jbehave-with-maven-3-rejectedexecutionexception

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!