Skip to content

Commit

Permalink
test: Fix system engine error check (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Jan 31, 2024
1 parent ccab497 commit 681cf4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions FireboltDotNetSdk.Tests/Integration/ExecuteTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void ExecuteLongTest()
DbCommand command = conn.CreateCommand();
command.CommandTimeout = 0; // make command timeout unlimited
// Use more rows for FB2.0 since it seems to be faster
var max = UserName == null ? 400000000000 : 250000000000;
var max = UserName == null ? 430000000000 : 250000000000;
command.CommandText = "SELECT checksum(*) FROM generate_series(1, @max)";
command.Prepare();
command.Parameters.Add(CreateParameter(command, "@max", max));
Expand Down Expand Up @@ -502,8 +502,7 @@ public void SelectInfinity(string query, double doubleExpected, float floatExpec
[TestCase("SELECT '-NaN'::float")]
public void SelectNaN(string query)
{
var conn = new FireboltConnection(USER_CONNECTION_STRING);
conn.Open();
var conn = new FireboltConnection(USER_CONNECTION_STRING); conn.Open();
DbDataReader reader = ExecuteTest(conn, query, double.NaN, typeof(float));
Assert.That(double.IsNaN(reader.GetDouble(0)), Is.True);
Assert.That(float.IsNaN(reader.GetFloat(0)), Is.True);
Expand Down
2 changes: 1 addition & 1 deletion FireboltDotNetSdk.Tests/Integration/SystemEngineTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void ErrorsTest(string query)
{
var command = CreateCommand(query);
string errorMessage = Assert.Throws<FireboltException>(() => { command.ExecuteNonQuery(); })?.Message ?? "";
Assert.True(errorMessage.Contains("Run this query on a user engine."));
Assert.True(errorMessage.Contains("Run this statement on a user engine."));
}

[Test]
Expand Down

0 comments on commit 681cf4c

Please sign in to comment.