Skip to content

Commit

Permalink
GH-34367: [Java] Fix build error from sequential merges (#34368)
Browse files Browse the repository at this point in the history
### Rationale for this change

I broke main by merging two PRs in quick succession that unfortunately didn't work together.

### What changes are included in this PR?

Fix the build error.

### Are these changes tested?

N/A

### Are there any user-facing changes?

No, test code only
* Closes: #34367

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
  • Loading branch information
lidavidm committed Feb 27, 2023
1 parent 589a847 commit 25db9c1
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.arrow.flight.FlightStream;
import org.apache.arrow.flight.FlightTestUtil;
import org.apache.arrow.flight.HeaderCallOption;
import org.apache.arrow.flight.Location;
import org.apache.arrow.flight.NoOpFlightProducer;
import org.apache.arrow.flight.RequestContext;
import org.apache.arrow.flight.SyncPutListener;
Expand Down Expand Up @@ -74,10 +75,12 @@ public void setUp() throws Exception {
callHeaders.insert(entry.getKey(), entry.getValue());
}
headers = new HeaderCallOption(callHeaders);
server = FlightTestUtil.getStartedServer(location ->
FlightServer.builder(allocator, location, new NoOpFlightProducer())
.middleware(FlightServerMiddleware.Key.of("customHeader"), headersMiddleware)
.build());
server = FlightServer.builder(allocator,
Location.forGrpcInsecure(FlightTestUtil.LOCALHOST, /*port*/ 0),
new NoOpFlightProducer())
.middleware(FlightServerMiddleware.Key.of("customHeader"), headersMiddleware)
.build();
server.start();
client = FlightClient.builder(allocator, server.getLocation()).build();
}

Expand Down

0 comments on commit 25db9c1

Please sign in to comment.