Skip to content

Commit 09f11eb

Browse files
committed
Removed @ignore.
1 parent 9e19efc commit 09f11eb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/test/java/org/apache/ibatis/submitted/batch_keys/BatchKeysTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.apache.ibatis.session.SqlSessionFactory;
3838
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
3939
import org.junit.Before;
40-
import org.junit.Ignore;
4140
import org.junit.Test;
4241

4342
public class BatchKeysTest {
@@ -113,8 +112,6 @@ public void testJdbc3Support() throws Exception {
113112

114113
}
115114

116-
@Ignore // Jdbc3 keys will not work with current implementation
117-
// but it seems that neither derby nor hsdqlb are able to return keys with batches
118115
@Test
119116
public void testInsertJdbc3() throws Exception {
120117
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
@@ -124,8 +121,8 @@ public void testInsertJdbc3() throws Exception {
124121
User user2 = new User(null, "Valentina");
125122
sqlSession.insert("insertIdentity", user2);
126123
sqlSession.flushStatements();
127-
assertEquals(new Integer(50), user1.getId());
128-
assertEquals(new Integer(50), user2.getId());
124+
assertEquals(Integer.valueOf(0), user1.getId());
125+
assertEquals(Integer.valueOf(1), user2.getId());
129126
sqlSession.commit();
130127
} finally {
131128
sqlSession.close();

src/test/java/org/apache/ibatis/submitted/batch_keys/Mapper.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</select>
4242

4343
<insert id="insertIdentity" keyProperty="id" useGeneratedKeys="true">
44-
insert into users2 (id, name) values(null, #{name})
44+
insert into users2 (name) values(#{name})
4545
</insert>
4646

4747
<select id="selectIdentity" resultType="org.apache.ibatis.submitted.batch_keys.User" >

0 commit comments

Comments
 (0)