From 67eb3b7bd1d1d37e460909b1c7b03b6f40975673 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 3 Jul 2019 10:45:30 -0400
Subject: [PATCH] Skip Flight domain socket test when path too long
---
.../test/java/org/apache/arrow/flight/TestServerOptions.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/java/flight/src/test/java/org/apache/arrow/flight/TestServerOptions.java b/java/flight/src/test/java/org/apache/arrow/flight/TestServerOptions.java
index e3ac3908941..c745de912f3 100644
--- a/java/flight/src/test/java/org/apache/arrow/flight/TestServerOptions.java
+++ b/java/flight/src/test/java/org/apache/arrow/flight/TestServerOptions.java
@@ -38,6 +38,9 @@ public void domainSocket() throws Exception {
Assume.assumeTrue("We have a native transport available", FlightTestUtil.isNativeTransportAvailable());
final File domainSocket = File.createTempFile("flight-unit-test-", ".sock");
Assert.assertTrue(domainSocket.delete());
+ // Domain socket paths have a platform-dependent limit. Set a conservative limit and skip the test if the temporary
+ // file name is too long. (We do not assume a particular platform-dependent temporary directory path.)
+ Assume.assumeTrue("The domain socket path is not too long", domainSocket.getAbsolutePath().length() < 100);
final Location location = Location.forGrpcDomainSocket(domainSocket.getAbsolutePath());
try (
BufferAllocator a = new RootAllocator(Long.MAX_VALUE);