From 38d1350b88f88eb82cb95fc7bc7040a1cdb3ab04 Mon Sep 17 00:00:00 2001 From: Ananya Garg Date: Fri, 13 Dec 2024 22:34:40 +0530 Subject: [PATCH] Update DatabaseMetadataTest.java - testing --- .../microsoft/sqlserver/jdbc/DatabaseMetadataTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/DatabaseMetadataTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/DatabaseMetadataTest.java index 52ca80fd8..bb356f165 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/DatabaseMetadataTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/DatabaseMetadataTest.java @@ -8,9 +8,7 @@ import java.sql.SQLException; import java.sql.Statement; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import com.microsoft.sqlserver.testframework.AbstractTest; import com.microsoft.sqlserver.testframework.AbstractSQLGenerator; @@ -38,7 +36,7 @@ public void testGetIndexInfo() throws SQLException, SQLServerException { col3Name + " INT)"; stmt.executeUpdate(createTableSQL); - String createClusteredIndexSQL = "CREATE CLUSTERED INDEX IDX_Clustered ON " + tableName + "(" + col1Name + ")"; + String createClusteredIndexSQL = "CREATE CLUSTERED INDEX IDX_Clustered ON " + tableName + "(" + col1Name + ")"; stmt.executeUpdate(createClusteredIndexSQL); String createNonClusteredIndexSQL = "CREATE NONCLUSTERED INDEX IDX_NonClustered ON " + tableName + "(" + col2Name + ")"; @@ -56,10 +54,11 @@ public void testGetIndexInfo() throws SQLException, SQLServerException { boolean hasClusteredIndex = false; boolean hasNonClusteredIndex = false; boolean hasColumnstoreIndex = false; - + System.out.println("Testing getIndexInfo " + rs); while (rs.next()) { String indexType = rs.getString("IndexType"); String indexName = rs.getString("IndexName"); + System.out.println(indexType + " " + indexName); if (indexType.contains("COLUMNSTORE")) { hasColumnstoreIndex = true; @@ -73,8 +72,6 @@ public void testGetIndexInfo() throws SQLException, SQLServerException { assertTrue(hasClusteredIndex, "CLUSTERED index found."); assertTrue(hasNonClusteredIndex, "NONCLUSTERED index found."); assertTrue(hasColumnstoreIndex, "COLUMNSTORE index found."); - } catch (SQLException e) { - fail("Exception occurred while testing getIndexInfo: " + e.getMessage()); } } }