File tree 1 file changed +8
-8
lines changed
src/test/java/net/snowflake/client/jdbc
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,15 @@ public void testDataSourceWithoutUsernameOrPasswordThrowsExplicitException() {
120
120
121
121
ds .setAccount ("testaccount" );
122
122
ds .setAuthenticator ("snowflake" );
123
- assertThrows (
124
- SnowflakeSQLException . class ,
125
- ds :: getConnection ,
126
- "Cannot create connection because username is missing in DataSource properties." );
123
+ Exception e = assertThrows (SnowflakeSQLException . class , ds :: getConnection );
124
+ assertEquals (
125
+ "Cannot create connection because username is missing in DataSource properties." ,
126
+ e . getMessage () );
127
127
128
128
ds .setUser ("testuser" );
129
- assertThrows (
130
- SnowflakeSQLException . class ,
131
- ds :: getConnection ,
132
- "Cannot create connection because password is missing in DataSource properties." );
129
+ e = assertThrows (SnowflakeSQLException . class , ds :: getConnection );
130
+ assertEquals (
131
+ "Cannot create connection because password is missing in DataSource properties." ,
132
+ e . getMessage () );
133
133
}
134
134
}
You can’t perform that action at this time.
0 commit comments