java - Configuring JBehave to run multithread TestNG tests -


i'm trying create proof-of-concept of using jbehave , testng together. want do, run story simultaneously in multiple threads in order test codes thread safety.

i have simple class 1 thing, calculates modulo 7 on given integer value. i've created simple bdd test class. i've set bdd test described in jbehave "getting started" documentation. difference is, in junitstory file, instead of using junit's @test annotation, i've used testng's

@org.testng.annotations.test(threadpoolsize = 10, invocationcount = 100, timeout = 10000) 

when run test, goes fine first 70-90% of cases, exception occurs , rest of runs fail

===============================================     default test     tests run: 100, failures: 11, skips: 0 =============================================== 

the exception occurs

failed: run java.util.concurrent.rejectedexecutionexception     @ java.util.concurrent.threadpoolexecutor$abortpolicy.rejectedexecution(threadpoolexecutor.java:1774)     @ java.util.concurrent.threadpoolexecutor.reject(threadpoolexecutor.java:768)     @ java.util.concurrent.threadpoolexecutor.execute(threadpoolexecutor.java:656)     @ java.util.concurrent.abstractexecutorservice.submit(abstractexecutorservice.java:92)     @ org.jbehave.core.embedder.storymanager.submit(storymanager.java:203)     @ org.jbehave.core.embedder.storymanager.runningstory(storymanager.java:138)     @ org.jbehave.core.embedder.storymanager.filterrunning(storymanager.java:122)     @ org.jbehave.core.embedder.storymanager.runningstoriesaspaths(storymanager.java:107)     @ org.jbehave.core.embedder.storymanager.performstories(storymanager.java:93)     @ org.jbehave.core.embedder.storymanager.runstories(storymanager.java:81) .... 

i'm relatively new both jbehave , testng, wondering if configuration issue or bug in jbehave.

could thread pool has been shutdown , (or jbehave) trying submit tasks it?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -