Skip to content

Commit cca89ed

Browse files
committed
substitute with function
1 parent 06c1508 commit cca89ed

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/TestContainerStateMachine.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,7 @@ public void testWriteTimout() throws Exception {
279279

280280
setUpMockRequestProto(context);
281281
AtomicReference<Throwable> throwable = new AtomicReference<>(null);
282-
Function<Throwable, ? extends Message> throwableSetter = t -> {
283-
throwable.set(t);
284-
return null;
285-
};
282+
Function<Throwable, ? extends Message> throwableSetter = getThrowableSetter(throwable);
286283
Field writeChunkWaitMaxNs = stateMachine.getClass().getDeclaredField("writeChunkWaitMaxNs");
287284
writeChunkWaitMaxNs.setAccessible(true);
288285
writeChunkWaitMaxNs.set(stateMachine, 1000_000_000);

0 commit comments

Comments
 (0)