Skip to content

Commit baa3e8c

Browse files
Merge pull request #550 from cloudsufi/cherry-pick/69a2af04cfa09841772ea7c92eca12c57b701812
[🍒] Revert cdap.plugin.version to 2.13.0-SNAPSHOT
2 parents f50aab5 + 35607b5 commit baa3e8c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

database-commons/src/test/java/io/cdap/plugin/db/CommonSchemaReaderTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.cdap.plugin.db;
1818

1919
import io.cdap.cdap.api.data.schema.Schema;
20+
import io.cdap.cdap.api.exception.ProgramFailureException;
2021
import org.junit.Assert;
2122
import org.junit.Before;
2223
import org.junit.Test;
@@ -162,49 +163,49 @@ public void testGetSchemaThrowsExceptionOnNumericWithZeroPrecision() throws SQLE
162163
reader.getSchema(metadata, 1);
163164
}
164165

165-
@Test(expected = SQLException.class)
166+
@Test(expected = ProgramFailureException.class)
166167
public void testGetSchemaThrowsExceptionOnArray() throws SQLException {
167168
when(metadata.getColumnType(eq(1))).thenReturn(Types.ARRAY);
168169
reader.getSchema(metadata, 1);
169170
}
170171

171-
@Test(expected = SQLException.class)
172+
@Test(expected = ProgramFailureException.class)
172173
public void testGetSchemaThrowsExceptionOnDatalink() throws SQLException {
173174
when(metadata.getColumnType(eq(1))).thenReturn(Types.DATALINK);
174175
reader.getSchema(metadata, 1);
175176
}
176177

177-
@Test(expected = SQLException.class)
178+
@Test(expected = ProgramFailureException.class)
178179
public void testGetSchemaThrowsExceptionOnDistinct() throws SQLException {
179180
when(metadata.getColumnType(eq(1))).thenReturn(Types.DISTINCT);
180181
reader.getSchema(metadata, 1);
181182
}
182183

183-
@Test(expected = SQLException.class)
184+
@Test(expected = ProgramFailureException.class)
184185
public void testGetSchemaThrowsExceptionOnJavaObject() throws SQLException {
185186
when(metadata.getColumnType(eq(1))).thenReturn(Types.JAVA_OBJECT);
186187
reader.getSchema(metadata, 1);
187188
}
188189

189-
@Test(expected = SQLException.class)
190+
@Test(expected = ProgramFailureException.class)
190191
public void testGetSchemaThrowsExceptionOnOther() throws SQLException {
191192
when(metadata.getColumnType(eq(1))).thenReturn(Types.OTHER);
192193
reader.getSchema(metadata, 1);
193194
}
194195

195-
@Test(expected = SQLException.class)
196+
@Test(expected = ProgramFailureException.class)
196197
public void testGetSchemaThrowsExceptionOnRef() throws SQLException {
197198
when(metadata.getColumnType(eq(1))).thenReturn(Types.REF);
198199
reader.getSchema(metadata, 1);
199200
}
200201

201-
@Test(expected = SQLException.class)
202+
@Test(expected = ProgramFailureException.class)
202203
public void testGetSchemaThrowsExceptionOnSQLXML() throws SQLException {
203204
when(metadata.getColumnType(eq(1))).thenReturn(Types.SQLXML);
204205
reader.getSchema(metadata, 1);
205206
}
206207

207-
@Test(expected = SQLException.class)
208+
@Test(expected = ProgramFailureException.class)
208209
public void testGetSchemaThrowsExceptionOnStruct() throws SQLException {
209210
when(metadata.getColumnType(eq(1))).thenReturn(Types.STRUCT);
210211
reader.getSchema(metadata, 1);

0 commit comments

Comments
 (0)