CurtHagenlocher commented on code in PR #2806:
URL: https://github.com/apache/arrow-adbc/pull/2806#discussion_r2096091174
##########
csharp/test/Drivers/Databricks/DatabricksConnectionTest.cs:
##########
@@ -19,13 +19,16 @@
using System.Collections.Generic;
using System.Globalization;
using System.Net;
+using Apache.Arrow.Adbc;
using Apache.Arrow.Adbc.Drivers.Apache;
using Apache.Arrow.Adbc.Drivers.Apache.Hive2;
using Apache.Arrow.Adbc.Drivers.Apache.Spark;
using Apache.Arrow.Adbc.Drivers.Databricks;
+using Apache.Hive.Service.Rpc.Thrift;
using Thrift.Transport;
using Xunit;
using Xunit.Abstractions;
+using System.Reflection;
Review Comment:
nit: namespace ordering
##########
csharp/test/Drivers/Databricks/DatabricksConnectionTest.cs:
##########
@@ -315,5 +318,31 @@ public InvalidConnectionParametersTestData()
Add(new(new() { [SparkParameters.Type] =
SparkServerTypeConstants.Http, [SparkParameters.HostName] = "valid.server.com",
[AdbcOptions.Username] = "user", [AdbcOptions.Password] = "myPassword",
[DatabricksParameters.TemporarilyUnavailableRetryTimeout] = "-1" },
typeof(ArgumentOutOfRangeException)));
}
}
+
+ /// <summary>
+ /// Tests that default namespace is correctly stored in the connection.
+ /// </summary>
+ [SkippableFact]
+ internal void DefaultNamespaceStoredInConnection()
+ {
+ // Skip if default catalog or schema is not configured
+ Skip.If(string.IsNullOrEmpty(TestConfiguration.DefaultCatalog),
"Default catalog not configured");
+ Skip.If(string.IsNullOrEmpty(TestConfiguration.DefaultSchema),
"Default schema not configured");
+
+ // Act
+ using var connection = NewConnection();
+
+ // Assert
+ Assert.NotNull(connection);
+ Assert.IsType<DatabricksConnection>(connection);
+
+ var defaultNamespaceProperty =
typeof(DatabricksConnection).GetProperty("DefaultNamespace",
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
Review Comment:
With `InternalsVisibleToAttribute` and an internal property, it shouldn't be
necessary to use Reflection to get at this property value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]