@@ -1319,7 +1319,7 @@ public void testStatementDescribe() throws SQLException {
1319
1319
}
1320
1320
1321
1321
@ Test
1322
- public void testBatchWithPrepareThreshold5 () throws SQLException {
1322
+ public void testBatchWithPrepareThreshold1 () throws SQLException {
1323
1323
assumeBinaryModeRegular ();
1324
1324
Assume .assumeTrue ("simple protocol only does not support prepared statement requests" ,
1325
1325
preferQueryMode != PreferQueryMode .SIMPLE );
@@ -1331,7 +1331,7 @@ public void testBatchWithPrepareThreshold5() throws SQLException {
1331
1331
// When using a prepareThreshold of 5, a batch update should use server-side prepare
1332
1332
pstmt = con .prepareStatement ("INSERT INTO batch_tab_threshold5 (id, val) VALUES (?,?)" );
1333
1333
((PgStatement ) pstmt ).setPrepareThreshold (5 );
1334
- for (int p = 0 ; p < 5 ; p ++) {
1334
+ for (int p = 0 ; p < 1 ; p ++) {
1335
1335
for (int i = 0 ; i <= 5 ; i ++) {
1336
1336
pstmt .setLong (1 , i );
1337
1337
pstmt .setLong (2 , i );
@@ -1340,9 +1340,9 @@ public void testBatchWithPrepareThreshold5() throws SQLException {
1340
1340
pstmt .executeBatch ();
1341
1341
}
1342
1342
pstmt .close ();
1343
- assertTrue ("prepareThreshold=5 , so the statement should be server-prepared" ,
1343
+ assertTrue ("prepareThreshold=1 , so the statement should be server-prepared" ,
1344
1344
((PGStatement ) pstmt ).isUseServerPrepare ());
1345
- assertEquals ("prepareThreshold=5 , so the statement should be server-prepared" , 1 ,
1345
+ assertEquals ("prepareThreshold=1 , so the statement should be server-prepared" , 1 ,
1346
1346
getNumberOfServerPreparedStatements ("INSERT INTO batch_tab_threshold5 (id, val) VALUES ($1,$2)" ));
1347
1347
}
1348
1348
0 commit comments