Forums: Open Discussion (Thread #23646)

単体テストのロールバック機能を無効化にしたい (2009-08-18 12:02 by いくお #45437)

お世話になっております。

いくです。

標題の件、TERASOLUNAバッチフレームワークにて
下記ライブラリを使用して単体テストを行っているのですが勝手にロールバックされてしまいます。
・junit-addons-1.4.jar
・spring-mock.jar
・terasoluna-utlib.jar
・terasoluna-utlib-spring.jar

ロールバックを無効化にできないでしょうか。
ご教授の程お願い致します。

※下記のようなログメッセージがでます。
【AbstractTransactionalSpringContextTests】クラスで制御をおこなってるのでしょうが、、
どうしたらよいのか。。
--------------------------------------------------------------------------------------------
[2009/08/18 12:01:41] [AbstractTransactionalSpringContextTests] [INFO ] Rolled back transaction after test execution

--------------------------------------------------------------------------------------------

Reply to #45437×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 単体テストのロールバック機能を無効化にしたい (2009-08-19 16:51 by hachihachi #45462)

デフォルトではdefaultRollbackフラグがtrueに設定されています。
setDefaultRollback(false);メソッドを呼んでみてはいかがでしょう?

Reply to #45437

Reply to #45462×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 単体テストのロールバック機能を無効化にしたい (2009-08-27 13:13 by トランザクションマン #45583)

ありがとうございます。
やってみます。
Reply to #45437

Reply to #45583×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login