Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring transactions still not working #717

Closed
wants to merge 16 commits into from

Conversation

aslakhellesoy
Copy link
Contributor

Ref #711 I have made a small change that demonstrates how transactions are still not working properly.

cd examples/spring-txn
mvn clean test
mvn test

The 2nd time tests are run they will fail. To trigger this I made the database file based instead of in-memory so that records from the previous run are left in the database.

brasmusson and others added 16 commits May 2, 2014 20:01
Use the first class found with spring annotation, to create the
TestContextManagers for all glue classes.
Also remove the @TxN annotation from see_message.feature, since it
fails if transactions are used.
Test that if a step def class autowires another step def class that has
not been used yet. Then it is the instance that was autowired that are
returned to the backend, when asked for an instance.
Let the SpringFactory register the bean definitions of the glue classes
in the bean factory of TestContextManager's context. Use this bean
factoryto create the instances of the glue classes. Alse register the
GlueCodeScope in bean factory of the TestContextManager's context.
Make sure that glue classes with different @ContextConfiguration/
@ContextHierarchy annotations are defined in different packages
(since the SpringFactory will throw an exception if glue classes
are added with @ContextConfiguration/@ContextHierarchy annotations
that are not equal).
  cd examples/spring-txn && mvn clean test && mvn test
@aslakhellesoy
Copy link
Contributor Author

False alarm. Transactions seem to be working after all:

mvn clean test -Dcucumber.options="--tags @txn" && mvn test -Dcucumber.options="--tags @txn"

@brasmusson
Copy link
Contributor

Hopefully they do ;-)
There are definitely more tests added for them now. But one of the features in the spring-txn example is not executed with transactions. That Feature was added during the the time that transaction was disable by mistake in that example, and when they were enabled again the Scenario failed. Since I did not immediately see how to fix it, I just remove the @txn tag (ebf0da7) from the Feature and focused on the spring module instead.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants