22
22
import java .util .TimeZone ;
23
23
import java .util .UUID ;
24
24
25
- import org .junit .Assert ;
26
25
import org .junit .jupiter .api .AfterAll ;
27
26
import org .junit .jupiter .api .BeforeAll ;
28
27
import org .junit .jupiter .api .Tag ;
@@ -58,8 +57,6 @@ public class CallableStatementTest extends AbstractTest {
58
57
.escapeIdentifier (RandomUtil .getIdentifier ("CallableStatementTest_inputParams_SP" ));
59
58
private static String conditionalSproc = AbstractSQLGenerator
60
59
.escapeIdentifier (RandomUtil .getIdentifier ("CallableStatementTest_conditionalSproc" ));
61
- private static String simpleRetValSproc = AbstractSQLGenerator
62
- .escapeIdentifier (RandomUtil .getIdentifier ("CallableStatementTest_simpleSproc" ));
63
60
private static String getObjectLocalDateTimeProcedureName = AbstractSQLGenerator
64
61
.escapeIdentifier (RandomUtil .getIdentifier ("CallableStatementTest_getObjectLocalDateTime_SP" ));
65
62
private static String getObjectOffsetDateTimeProcedureName = AbstractSQLGenerator
@@ -103,7 +100,6 @@ public static void setupTest() throws Exception {
103
100
TestUtils .dropProcedureIfExists (outOfOrderSproc , stmt );
104
101
TestUtils .dropProcedureIfExists (byParamNameSproc , stmt );
105
102
TestUtils .dropProcedureIfExists (conditionalSproc , stmt );
106
- TestUtils .dropProcedureIfExists (simpleRetValSproc , stmt );
107
103
TestUtils .dropFunctionIfExists (userDefinedFunction , stmt );
108
104
TestUtils .dropUserDefinedTypeIfExists (manyParamUserDefinedType , stmt );
109
105
TestUtils .dropProcedureIfExists (manyParamProc , stmt );
@@ -123,7 +119,6 @@ public static void setupTest() throws Exception {
123
119
createOutOfOrderSproc ();
124
120
createByParamNameSproc ();
125
121
createConditionalProcedure ();
126
- createSimpleRetValSproc ();
127
122
createUserDefinedFunction ();
128
123
}
129
124
}
@@ -1202,21 +1197,6 @@ public void testCallableStatementDefaultValues() throws SQLException {
1202
1197
}
1203
1198
}
1204
1199
1205
- @ Test
1206
- public void testCallableStatementSetByAnnotatedArgs () throws SQLException {
1207
- String call = "{? = call " + simpleRetValSproc + " (@Arg1 = ?)}" ;
1208
- int expectedValue = 1 ; // The sproc should return this value
1209
-
1210
- try (CallableStatement cstmt = connection .prepareCall (call )) {
1211
- cstmt .registerOutParameter (1 , Types .INTEGER );
1212
- cstmt .setInt (1 , 2 );
1213
- cstmt .setString (2 , "foo" );
1214
- cstmt .execute ();
1215
-
1216
- Assert .assertEquals (expectedValue , cstmt .getInt (1 ));
1217
- }
1218
- }
1219
-
1220
1200
@ Test
1221
1201
@ Tag (Constants .reqExternalSetup )
1222
1202
@ Tag (Constants .xAzureSQLDB )
@@ -1325,7 +1305,6 @@ public static void cleanup() throws SQLException {
1325
1305
TestUtils .dropProcedureIfExists (byParamNameSproc , stmt );
1326
1306
TestUtils .dropProcedureIfExists (currentTimeProc , stmt );
1327
1307
TestUtils .dropProcedureIfExists (conditionalSproc , stmt );
1328
- TestUtils .dropProcedureIfExists (simpleRetValSproc , stmt );
1329
1308
TestUtils .dropFunctionIfExists (userDefinedFunction , stmt );
1330
1309
}
1331
1310
}
@@ -1394,13 +1373,6 @@ private static void createConditionalProcedure() throws SQLException {
1394
1373
}
1395
1374
}
1396
1375
1397
- private static void createSimpleRetValSproc () throws SQLException {
1398
- String sql = "CREATE PROCEDURE " + simpleRetValSproc + " (@Arg1 VARCHAR(128)) AS DECLARE @ReturnCode INT RETURN 1" ;
1399
- try (Statement stmt = connection .createStatement ()) {
1400
- stmt .execute (sql );
1401
- }
1402
- }
1403
-
1404
1376
private static void createTableManyParams () throws SQLException {
1405
1377
String type = manyParamUserDefinedType ;
1406
1378
String sql = "CREATE TABLE" + manyParamsTable + " (c1 " + type + " null, " + "c2 " + type + " null, " + "c3 "
0 commit comments