Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.cdap.plugin.db;

import io.cdap.cdap.api.data.schema.Schema;
import io.cdap.cdap.api.exception.ProgramFailureException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -162,49 +163,49 @@ public void testGetSchemaThrowsExceptionOnNumericWithZeroPrecision() throws SQLE
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnArray() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.ARRAY);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnDatalink() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.DATALINK);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnDistinct() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.DISTINCT);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnJavaObject() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.JAVA_OBJECT);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnOther() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.OTHER);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnRef() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.REF);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnSQLXML() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.SQLXML);
reader.getSchema(metadata, 1);
}

@Test(expected = SQLException.class)
@Test(expected = ProgramFailureException.class)
public void testGetSchemaThrowsExceptionOnStruct() throws SQLException {
when(metadata.getColumnType(eq(1))).thenReturn(Types.STRUCT);
reader.getSchema(metadata, 1);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- version properties -->
<cdap.version>6.11.0-SNAPSHOT</cdap.version>
<cdap.plugin.version>2.14.0-SNAPSHOT</cdap.plugin.version>
<cdap.plugin.version>2.13.0-SNAPSHOT</cdap.plugin.version>
<guava.version>13.0.1</guava.version>
<hadoop.version>3.3.6</hadoop.version>
<hsql.version>2.2.4</hsql.version>
Expand Down
Loading