Skip to content

Commit b00d27a

Browse files
committed
exclude AEv2 tests
1 parent 7de3d63 commit b00d27a

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ public static void setupAETest() throws Exception {
218218
// reset logging to avoid severe logs due to negative testing
219219
LogManager.getLogManager().reset();
220220

221-
try {
222221
// setup test params and encryption keys on each server
223222
for (int i = 0; i < enclaveServer.length; i++) {
224223
String serverName = enclaveServer[i];
@@ -247,10 +246,6 @@ public static void setupAETest() throws Exception {
247246
createCEK(AETestConnectionString, cmkWin, cekWin, null);
248247
}
249248
}
250-
} catch (Exception e) {
251-
System.out.println("AESetup exception: "+e.getMessage());
252-
e.printStackTrace();
253-
}
254249
}
255250

256251
/**
@@ -1993,7 +1988,6 @@ protected static void dropObject(String connString, String objectType, String ob
19931988
protected void testAlterColumnEncryption(SQLServerStatement stmt, String tableName, String table[][],
19941989
String cekName) throws SQLException {
19951990
try (SQLServerConnection con = PrepUtil.getConnection(AETestConnectionString, AEInfo)) {
1996-
System.out.println("testAlterColumnEncryption connected");
19971991
for (int i = 0; i < table.length; i++) {
19981992
// alter deterministic to randomized
19991993
String sql = "ALTER TABLE " + tableName + " ALTER COLUMN " + ColumnType.DETERMINISTIC.name()
@@ -2012,9 +2006,6 @@ protected void testAlterColumnEncryption(SQLServerStatement stmt, String tableNa
20122006
}
20132007
}
20142008
}
2015-
} catch (Exception e) {
2016-
System.out.println("testAlterColumnEncryption exception: " + e.getMessage());
2017-
System.out.println("AETestConnectionString: " + AETestConnectionString);
2018-
}
2009+
}
20192010
}
20202011
}

src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/EnclaveTest.java

+1-15
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
@Tag(Constants.xAzureSQLDW)
4545
@Tag(Constants.xAzureSQLDB)
4646
@Tag(Constants.reqExternalSetup)
47+
@Tag(Constants.requireSecret)
4748
public class EnclaveTest extends AESetup {
4849
/**
4950
* Tests basic connection.
@@ -348,9 +349,6 @@ public void testChar(String serverName, String url, String protocol) throws Exce
348349
createTable(CHAR_TABLE_AE, cekJks, charTable);
349350
populateCharNormalCase(createCharValues(false));
350351
testAlterColumnEncryption(stmt, CHAR_TABLE_AE, charTable, cekJks);
351-
} catch (Exception e) {
352-
System.out.println("exception: " + e.getMessage());
353-
e.printStackTrace();
354352
}
355353
}
356354

@@ -368,9 +366,6 @@ public void testCharAkv(String serverName, String url, String protocol) throws E
368366
createTable(CHAR_TABLE_AE, cekAkv, charTable);
369367
populateCharNormalCase(createCharValues(false));
370368
testAlterColumnEncryption(stmt, CHAR_TABLE_AE, charTable, cekAkv);
371-
} catch (Exception e) {
372-
System.out.println("exception: " + e.getMessage());
373-
e.printStackTrace();
374369
}
375370
}
376371

@@ -414,9 +409,6 @@ public void testAlter(String serverName, String url, String protocol) throws Exc
414409
pstmt = c.prepareStatement("ALTER TABLE " + CHAR_TABLE_AE
415410
+ " ALTER COLUMN RandomizedVarchar VARCHAR(20) NULL WITH (ONLINE = ON)");
416411
pstmt.execute();
417-
} catch (Exception e) {
418-
System.out.println("exception: " + e.getMessage());
419-
e.printStackTrace();
420412
}
421413
}
422414

@@ -444,9 +436,6 @@ public void testNumericRichQuery(String serverName, String url, String protocol)
444436
assertTrue(3 == rs.getInt(3), "rs.getInt(3)=" + rs.getInt(3));
445437
}
446438
}
447-
} catch (Exception e) {
448-
System.out.println("exception: " + e.getMessage());
449-
e.printStackTrace();
450439
}
451440
}
452441

@@ -475,9 +464,6 @@ public void testStringRichQuery(String serverName, String url, String protocol)
475464
assertTrue(rs.getString(3).equalsIgnoreCase("test"), "rs.getString(3)=" + rs.getString(3));
476465
}
477466
}
478-
} catch (Exception e) {
479-
System.out.println("exception: " + e.getMessage());
480-
e.printStackTrace();
481467
}
482468
}
483469

0 commit comments

Comments
 (0)