File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
src/test/java/io/appform/dropwizard/sharding/dao/locktest Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,19 @@ public void testLockingFail() throws Exception {
122
122
.myId ("0" )
123
123
.build ();
124
124
lookupDao .save (p1 );
125
- lookupDao .lockAndGetExecutor ("0" )
126
- .filter (parent -> !Strings .isNullOrEmpty (parent .getName ()))
127
- .save (relationDao , parent -> {
128
- SomeOtherObject result = SomeOtherObject .builder ()
129
- .myId (parent .getMyId ())
130
- .value ("Hello" )
131
- .build ();
132
- parent .setName ("Changed" );
133
- return result ;
134
- })
135
- .mutate (parent -> parent .setName ("Changed" ))
136
- .execute ();
125
+ Assertions .assertThrows (IllegalArgumentException .class ,
126
+ () -> lookupDao .lockAndGetExecutor ("0" )
127
+ .filter (parent -> !Strings .isNullOrEmpty (parent .getName ()))
128
+ .save (relationDao , parent -> {
129
+ SomeOtherObject result = SomeOtherObject .builder ()
130
+ .myId (parent .getMyId ())
131
+ .value ("Hello" )
132
+ .build ();
133
+ parent .setName ("Changed" );
134
+ return result ;
135
+ })
136
+ .mutate (parent -> parent .setName ("Changed" ))
137
+ .execute ());
137
138
138
139
}
139
140
You can’t perform that action at this time.
0 commit comments