Skip to content

Commit

Permalink
Remove wrong test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Oct 14, 2024
1 parent a0e848c commit cef1b33
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions Snowflake.Data.Tests/IntegrationTests/VectorTypesIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Snowflake.Data.Client;
using System.Data.Common;
using Snowflake.Data.Core;
using Snowflake.Data.Tests.Util;
using System;

namespace Snowflake.Data.Tests.IntegrationTests
Expand Down Expand Up @@ -345,32 +344,6 @@ public void TestThrowExceptionForInvalidIdentifierForFloatVector()
}
}

[Test]
public void TestThrowExceptionForInvalidVectorType()
{
using (DbConnection conn = new SnowflakeDbConnection())
{
conn.ConnectionString = ConnectionString;
conn.Open();
AlterSessionSettings(conn);

using (DbCommand command = conn.CreateCommand())
{
command.CommandText = "SELECT ARRAY_CONSTRUCT(1.1)::ARRAY(DOUBLE)";
var reader = (SnowflakeDbDataReader)command.ExecuteReader();
Assert.IsTrue(reader.Read());

// act
var thrown = Assert.Throws<SnowflakeDbException>(() => reader.GetArray<double>(0));

// assert
SnowflakeDbExceptionAssert.HasErrorCode(thrown, SFError.STRUCTURED_TYPE_READ_DETAILED_ERROR);
Assert.That(thrown.Message, Does.Contain("Failed to read structured type when getting an array"));
Assert.That(thrown.Message, Does.Contain("Method GetArray<System.Double> can be used only for vector types"));
}
}
}

private void AlterSessionSettings(DbConnection conn)
{
using (var command = conn.CreateCommand())
Expand Down

0 comments on commit cef1b33

Please sign in to comment.