Skip to content

Commit 4e85ea5

Browse files
authored
Enable JSON tests to run on Azure SQL Database (#2756) (#2769)
1 parent b9c46d6 commit 4e85ea5

File tree

9 files changed

+27
-44
lines changed

9 files changed

+27
-44
lines changed

src/test/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopyCSVTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ public void testCSV2400() {
464464
* It verifies that the data is copied correctly by comparing the values in the table with the expected values.
465465
*/
466466
@Test
467+
@AzureDB
467468
@DisplayName("Test Bulk Copy with JSON Data")
468469
@Tag(Constants.JSONTest)
469470
public void testBulkCopyWithJson() throws Exception {

src/test/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopyISQLServerBulkRecordTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public void testBulkCopyVector() throws SQLException {
201201
* Test bulk copy with a single JSON row.
202202
*/
203203
@Test
204+
@AzureDB
204205
@Tag(Constants.JSONTest)
205206
public void testBulkCopyJSON() throws SQLException {
206207
String dstTable = TestUtils
@@ -235,6 +236,7 @@ public void testBulkCopyJSON() throws SQLException {
235236
* Test bulk copy with empty JSON document
236237
*/
237238
@Test
239+
@AzureDB
238240
@Tag(Constants.JSONTest)
239241
public void testBulkCopyWithEmptyJsonDocument() throws SQLException {
240242
String dstTable = TestUtils
@@ -274,6 +276,7 @@ public void testBulkCopyWithEmptyJsonDocument() throws SQLException {
274276
* and compared using getString(columnIndex)
275277
*/
276278
@Test
279+
@AzureDB
277280
@Tag(Constants.JSONTest)
278281
public void testBulkCopyMultipleJsonRowsWithDifferentStructures() throws SQLException {
279282
String dstTable = TestUtils
@@ -316,6 +319,7 @@ public void testBulkCopyMultipleJsonRowsWithDifferentStructures() throws SQLExce
316319
* Test bulk copy with multiple JSON rows.
317320
*/
318321
@Test
322+
@AzureDB
319323
@Tag(Constants.JSONTest)
320324
public void testBulkCopyMultipleJsonRows() throws SQLException {
321325
String dstTable = TestUtils
@@ -358,6 +362,7 @@ public void testBulkCopyMultipleJsonRows() throws SQLException {
358362
* Test bulk copy with multiple JSON rows and columns.
359363
*/
360364
@Test
365+
@AzureDB
361366
@Tag(Constants.JSONTest)
362367
public void testBulkCopyMultipleJsonRowsAndColumns() throws SQLException {
363368
String dstTable = TestUtils
@@ -400,6 +405,7 @@ public void testBulkCopyMultipleJsonRowsAndColumns() throws SQLException {
400405
* Test bulk copy with sendStringParametersAsUnicode set to true and false for JSON column.
401406
*/
402407
@Test
408+
@AzureDB
403409
@Tag(Constants.JSONTest)
404410
public void testBulkCopyWithSendStringParametersAsUnicode() throws SQLException {
405411
// Unicode scenario
@@ -459,6 +465,7 @@ public void testBulkCopyWithSendStringParametersAsUnicode() throws SQLException
459465
* Test bulk copy with nested JSON documents.
460466
*/
461467
@Test
468+
@AzureDB
462469
@Tag(Constants.JSONTest)
463470
public void testBulkCopyNestedJsonRows() throws SQLException {
464471
String dstTable = TestUtils
@@ -501,6 +508,7 @@ public void testBulkCopyNestedJsonRows() throws SQLException {
501508
* Test bulk copy with various data types in JSON.
502509
*/
503510
@Test
511+
@AzureDB
504512
@Tag(Constants.JSONTest)
505513
public void testBulkCopyWithVariousDataTypes() throws SQLException {
506514
String dstTable = TestUtils
@@ -539,6 +547,7 @@ public void testBulkCopyWithVariousDataTypes() throws SQLException {
539547
* Test bulk copy with count verification.
540548
*/
541549
@Test
550+
@AzureDB
542551
@Tag(Constants.JSONTest)
543552
public void testBulkCopyWithCountVerification() throws SQLException {
544553
String dstTable = TestUtils

src/test/java/com/microsoft/sqlserver/jdbc/callablestatement/CallableStatementTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import com.microsoft.sqlserver.jdbc.TestUtils;
3939
import com.microsoft.sqlserver.testframework.AbstractSQLGenerator;
4040
import com.microsoft.sqlserver.testframework.AbstractTest;
41+
import com.microsoft.sqlserver.testframework.AzureDB;
4142
import com.microsoft.sqlserver.testframework.Constants;
4243

4344

@@ -610,6 +611,7 @@ public void testTimestampStringConversion() throws SQLException {
610611
* @throws SQLException
611612
*/
612613
@Test
614+
@AzureDB
613615
@Tag(Constants.JSONTest)
614616
public void testJSONColumnInTableWithSetObject() throws SQLException {
615617

@@ -631,6 +633,7 @@ public void testJSONColumnInTableWithSetObject() throws SQLException {
631633
}
632634

633635
@Test
636+
@AzureDB
634637
@Tag(Constants.JSONTest)
635638
public void testJSONProcedureWithSetObject() throws SQLException {
636639

src/test/java/com/microsoft/sqlserver/jdbc/databasemetadata/DatabaseMetaDataTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@ public void testVectorMetaData() throws SQLException {
11601160
* @throws SQLException
11611161
*/
11621162
@Test
1163+
@AzureDB
11631164
@Tag(Constants.JSONTest)
11641165
public void testJSONMetaData() throws SQLException {
11651166
String jsonTableName = RandomUtil.getIdentifier("try_SQLJSON_Table");

0 commit comments

Comments
 (0)