File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
core/src/main/scala/org/ivovk/connect_rpc_scala Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ Run the following command to run Connect-RPC conformance tests:
82
82
docker build . --output "out" --progress=plain
83
83
```
84
84
85
- Execution results are output in STDOUT.
86
- Diagnostic data from the server itself is output in the ` out/out.log ` file .
85
+ Execution results are output to STDOUT.
86
+ Diagnostic data from the server itself is written to the log file ` out/out.log ` .
87
87
88
88
### Conformance tests status
89
89
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import io.grpc.stub.MetadataUtils
12
12
import org .http4s .*
13
13
import org .http4s .dsl .Http4sDsl
14
14
import org .ivovk .connect_rpc_scala .http .*
15
- import org .ivovk .connect_rpc_scala .http .Headers .*
15
+ import org .ivovk .connect_rpc_scala .http .Headers .`X-Test-Case-Name`
16
16
import org .ivovk .connect_rpc_scala .http .MessageCodec .given
17
17
import org .ivovk .connect_rpc_scala .http .QueryParams .*
18
18
import org .slf4j .{Logger , LoggerFactory }
@@ -151,8 +151,8 @@ object ConnectRpcHttpRoutes {
151
151
method.descriptor,
152
152
CallOptions .DEFAULT
153
153
.pipe(
154
- req.headers.get[`Connect-Timeout-Ms`]. fold[Endo [CallOptions ]](identity) { header =>
155
- _.withDeadlineAfter(header.value , MILLISECONDS )
154
+ req.timeout. fold[Endo [CallOptions ]](identity) { timeout =>
155
+ _.withDeadlineAfter(timeout , MILLISECONDS )
156
156
}
157
157
),
158
158
message
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ package org.ivovk.connect_rpc_scala.http
2
2
3
3
import cats .MonadThrow
4
4
import fs2 .Stream
5
- import org .http4s .{Charset , Headers , Media }
6
5
import org .http4s .headers .`Content-Type`
6
+ import org .http4s .{Charset , Headers , Media }
7
+ import org .ivovk .connect_rpc_scala .http .Headers .`Connect-Timeout-Ms`
7
8
import scalapb .{GeneratedMessage as Message , GeneratedMessageCompanion as Companion }
8
9
9
10
object RequestEntity {
@@ -26,6 +27,9 @@ case class RequestEntity[F[_]](
26
27
def charset : Charset =
27
28
contentType.flatMap(_.charset).getOrElse(Charset .`UTF-8`)
28
29
30
+ def timeout : Option [Long ] =
31
+ headers.get[`Connect-Timeout-Ms`].map(_.value)
32
+
29
33
def as [A <: Message ](using M : MonadThrow [F ], codec : MessageCodec [F ], cmp : Companion [A ]): F [A ] =
30
34
M .rethrow(codec.decode(this ).value)
31
35
You can’t perform that action at this time.
0 commit comments