Issue Type: Bug Bug
Affects Versions: 3.8
Assignee: Unassigned
Components: Spring Support
Created: 27/Jul/13 10:36 PM
Description:

For my tests to run, I need a database. Since I like the speed of H2 and the ability to start with a clean database of in-memory databases, I want to use Spring Frameworks jdbc:embedded-database construct.
I have the following in my my-steps.xml

<jdbc:embedded-database id="rxDataSource" type="H2">
 <jdbc:script location="classpath:rx.sql" />
</jdbc:embedded-database>

The file rx.sql contains SQL like "create table" and "insert into table" to get the database schema and sample data correct.
When I run mvn integration-test or the MyStory runner, then I get an error that the first table in the list is already defined.
I've traced it down to somehow the spring container is getting refresh() called and so it goes through and re-processes all the bean definitions, including running the sql script twice.


I can clearly see (when I turn org.springframework logging to debug) that the script is successfully run once, then later on it's called again.

Since this same technique is used in more traditional junit/spring based integration tests, I conclude that the issue is with jbehave.

Project: JBehave
Priority: Major Major
Reporter: Stephen Cooper
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to