From d9b90035ddf273fa547d34ad2f4b04c15af3704a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 25 Jul 2023 18:49:26 +0200 Subject: [PATCH] GH-36863: [C#][Packaging] Do not shutdown PythonEngine on CDataInterfacePythonTests if .NET is > 5.0 (#36868) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Rationale for this change Tests are failing on maintenance branch to generate Nuget packages. This has been tested on the maintenance branch and it solves the issue. ### What changes are included in this PR? Only Shutdown if `#if !NET5_0_OR_GREATER` ### Are these changes tested? Locally and via archery. ### Are there any user-facing changes? No * Closes: #36863 Authored-by: Raúl Cumplido Signed-off-by: Raúl Cumplido --- csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs b/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs index 4c53b98e3d9f1..86d7ff52cdf09 100644 --- a/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs +++ b/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs @@ -60,7 +60,9 @@ public PythonNet() public void Dispose() { +#if !NET5_0_OR_GREATER PythonEngine.Shutdown(); +#endif } }