This is an automated email from the ASF dual-hosted git repository.
curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 4011058f4a GH-36815: [C#]: Enable net472 tests under Windows (#36818)
4011058f4a is described below
commit 4011058f4a56bdcf160f46373355ffa0e22bcd2c
Author: Curt Hagenlocher <[email protected]>
AuthorDate: Mon Oct 16 19:53:50 2023 -0700
GH-36815: [C#]: Enable net472 tests under Windows (#36818)
### What changes are included in this PR?
The primary C# test project is updated to run for .NET 4.7.2 only on
Windows platforms.
### Are these changes tested?
Yes.
* Closes: #36815
Authored-by: Curt Hagenlocher <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
---
csharp/src/Apache.Arrow/Types/Time32Type.cs | 2 +-
csharp/src/Apache.Arrow/Types/Time64Type.cs | 2 +-
csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj | 12 ++++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/csharp/src/Apache.Arrow/Types/Time32Type.cs
b/csharp/src/Apache.Arrow/Types/Time32Type.cs
index 80a23d4934..7eb3c26187 100644
--- a/csharp/src/Apache.Arrow/Types/Time32Type.cs
+++ b/csharp/src/Apache.Arrow/Types/Time32Type.cs
@@ -18,7 +18,7 @@ namespace Apache.Arrow.Types
{
public sealed class Time32Type : TimeType
{
- public static readonly Time32Type Default = Millisecond;
+ public static Time32Type Default => Millisecond;
public override ArrowTypeId TypeId => ArrowTypeId.Time32;
public override string Name => "time32";
diff --git a/csharp/src/Apache.Arrow/Types/Time64Type.cs
b/csharp/src/Apache.Arrow/Types/Time64Type.cs
index e7d911c277..f674c25e44 100644
--- a/csharp/src/Apache.Arrow/Types/Time64Type.cs
+++ b/csharp/src/Apache.Arrow/Types/Time64Type.cs
@@ -18,7 +18,7 @@ namespace Apache.Arrow.Types
{
public sealed class Time64Type : TimeType
{
- public static readonly Time64Type Default = Nanosecond;
+ public static Time64Type Default => Nanosecond;
public override ArrowTypeId TypeId => ArrowTypeId.Time64;
public override string Name => "time64";
diff --git a/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
b/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
index d07cd233af..2d70532342 100644
--- a/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
+++ b/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
@@ -2,13 +2,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net7.0</TargetFrameworks>
- <!-- TODO: CI can't run with net472 on non-Windows platforms
- <TargetFrameworks>net7.0;net472</TargetFrameworks>
- -->
+ <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
+ <PropertyGroup Condition="'$(IsWindows)'=='true'">
+ <TargetFrameworks>net7.0;net472</TargetFrameworks>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(IsWindows)'!='true'">
+ <TargetFrameworks>net7.0</TargetFrameworks>
+ </PropertyGroup>
+
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.2" />