Class io.micronaut.http.server.netty.types.FileTypeHandlerSpec

7

tests

0

failures

0

ignored

0.061s

duration

100%

successful

Tests

Test Duration Result
test 304 is returned if the correct header is sent 0.007s passed
test returning a file from a controller 0.017s passed
test supports 0.007s passed
test the content type is honored when an attached file response is returned 0.005s passed
test what happens when a file isn't found 0.014s passed
test when an attached file is returned 0.006s passed
test when an attached file is returned with a name 0.005s passed

Standard output

00:21:26.501 [Test worker] INFO  i.m.context.env.DefaultEnvironment - Established active environments: [test, cloud, gcp]
00:21:26.503 [Test worker] INFO  i.m.context.env.DefaultEnvironment - Established active environments: [test, cloud, gcp]
00:21:26.583 [nioEventLoopGroup-27-8] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: Could not find file
io.micronaut.http.server.types.CustomizableResponseTypeException: Could not find file
	at io.micronaut.http.server.netty.types.files.NettySystemFileCustomizableResponseType.<init>(NettySystemFileCustomizableResponseType.java:70)
	at io.micronaut.http.server.netty.types.files.FileTypeHandler.handle(FileTypeHandler.java:69)
	at io.micronaut.http.server.netty.RoutingInBoundHandler$NettyCustomizableResponseTypeHandlerInvoker.invoke(RoutingInBoundHandler.java:1329)
	at io.micronaut.http.server.netty.RoutingInBoundHandler.writeFinalNettyResponse(RoutingInBoundHandler.java:1024)
	at io.micronaut.http.server.netty.RoutingInBoundHandler.access$400(RoutingInBoundHandler.java:117)
	at io.micronaut.http.server.netty.RoutingInBoundHandler$3.onComplete(RoutingInBoundHandler.java:1013)
	at io.micronaut.http.server.netty.RoutingInBoundHandler$3.onComplete(RoutingInBoundHandler.java:1010)
	at io.micronaut.http.server.netty.async.ContextCompletionAwareSubscriber.doOnComplete(ContextCompletionAwareSubscriber.java:72)
	at io.micronaut.core.async.subscriber.CompletionAwareSubscriber.onComplete(CompletionAwareSubscriber.java:72)
	at io.reactivex.internal.util.HalfSerializer.onComplete(HalfSerializer.java:91)
	at io.reactivex.internal.subscribers.StrictSubscriber.onComplete(StrictSubscriber.java:109)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120)
	at io.reactivex.internal.operators.flowable.FlowableSwitchMap$SwitchMapSubscriber.drain(FlowableSwitchMap.java:226)
	at io.reactivex.internal.operators.flowable.FlowableSwitchMap$SwitchMapSubscriber.onComplete(FlowableSwitchMap.java:155)
	at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.onComplete(FlowableSubscribeOn.java:108)
	at io.reactivex.internal.operators.flowable.FlowableSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FlowableSwitchIfEmpty.java:73)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120)
	at io.reactivex.internal.operators.flowable.FlowableCreate$BaseEmitter.complete(FlowableCreate.java:267)
	at io.reactivex.internal.operators.flowable.FlowableCreate$BaseEmitter.onComplete(FlowableCreate.java:259)
	at io.micronaut.http.server.netty.RoutingInBoundHandler.lambda$buildResultEmitter$13(RoutingInBoundHandler.java:1138)
	at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:72)
	at io.reactivex.Flowable.subscribe(Flowable.java:14349)
	at io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38)
	at io.reactivex.Flowable.subscribe(Flowable.java:14349)
	at io.reactivex.internal.operators.flowable.FlowableSwitchIfEmpty.subscribeActual(FlowableSwitchIfEmpty.java:32)
	at io.reactivex.Flowable.subscribe(Flowable.java:14349)
	at io.reactivex.Flowable.subscribe(Flowable.java:14295)
	at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
	at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:261)
	at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:226)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: /xyzabc (No such file or directory)
	at java.io.RandomAccessFile.open0(Native Method)
	at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
	at io.micronaut.http.server.netty.types.files.NettySystemFileCustomizableResponseType.<init>(NettySystemFileCustomizableResponseType.java:68)
	... 32 common frames omitted