首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试使用maven 3运行jbehave时出错(RejectedExecutionException)

尝试使用maven 3运行jbehave时出错(RejectedExecutionException)
EN

Stack Overflow用户
提问于 2016-03-04 01:23:45
回答 1查看 444关注 0票数 1

我正在尝试JBehave,我需要使用maven运行我的3个故事(每个故事或多或少有2个场景(testCases ->给定/何时/然后))。

当我运行mvn集成测试时,我有以下异常

代码语言:javascript
复制
[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]

我的POM配置是:

代码语言:javascript
复制
<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>           

但是如果我运行一个故事(例如,如果我只包含GenerateReportScenarios.java),执行是成功的……我不明白当我把这3个故事放在一起的时候,哪里出了问题

在这个问题上,每个人都可以帮助我吗?

谢谢。-

EN

回答 1

Stack Overflow用户

发布于 2016-04-21 16:16:33

我也有同样的例外,我删除了

< scope>测试< /scope >

行,现在它可以工作了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35778847

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档