Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class TestClient : CliktCommand() {

else ->
throw UnsupportedOperationException(
"only frame transport type is supported for now, got $transportType"
"only frame transport type is supported for now, got $transportType",
)
}

Expand Down Expand Up @@ -280,7 +280,7 @@ class TestClient : CliktCommand() {
if (xtructs != null) {
for ((string_thing, byte_thing, i32_thing, i64_thing) in xtructs) {
print(
"{\"$string_thing\", $byte_thing, $i32_thing, $i64_thing}, "
"{\"$string_thing\", $byte_thing, $i32_thing, $i64_thing}, ",
)
}
}
Expand Down Expand Up @@ -536,7 +536,7 @@ private suspend fun ThriftTestClient.structTest(returnCode: Int): Pair<Xtruct, I
out.i64_thing = -5
val input: Xtruct = testStruct(out)
print(
""" = {"${input.string_thing}",${input.byte_thing}, ${input.i32_thing}, ${input.i64_thing}}"""
""" = {"${input.string_thing}",${input.byte_thing}, ${input.i32_thing}, ${input.i64_thing}}""",
)
if (input != out) {
code = code or ERR_STRUCTS
Expand Down Expand Up @@ -655,7 +655,7 @@ private suspend fun ThriftTestClient.nestedStructTest(out: Xtruct, returnCode: I
val input = xstruct2.struct_thing!!
print(
""" = {${xstruct2.byte_thing}, {"${input.string_thing}", ${input.byte_thing}, ${input.i32_thing}, ${input.i64_thing}}, ${xstruct2.i32_thing}}
"""
""",
)
if (xstruct2 != out2) {
code = code or ERR_STRUCTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TestHandler : ThriftTest {

override suspend fun testStruct(thing: Xtruct): Xtruct {
logger.info(
"""testStruct({"${thing.string_thing}", ${thing.byte_thing}, ${thing.i32_thing}, ${thing.i64_thing}})"""
"""testStruct({"${thing.string_thing}", ${thing.byte_thing}, ${thing.i32_thing}, ${thing.i64_thing}})""",
)
return thing
}
Expand All @@ -105,7 +105,7 @@ class TestHandler : ThriftTest {
val thing2: Xtruct = thing.struct_thing!!
logger.info(
"""testNest({${thing.byte_thing}, {"${thing2.string_thing}", ${thing2.byte_thing}, ${thing2.i32_thing}, ${thing2.i64_thing}}, ${thing.i32_thing}})"""
.trimIndent()
.trimIndent(),
)
return thing
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ object TestServer {
}
} catch (e: Exception) {
throw RuntimeException(
"The context is not a wrapper and does not implement the interface"
"The context is not a wrapper and does not implement the interface",
)
}
}
Expand All @@ -99,7 +99,7 @@ object TestServer {

override fun preServe() {
println(
"TServerEventHandler.preServe - called only once before server starts accepting connections"
"TServerEventHandler.preServe - called only once before server starts accepting connections",
)
}

Expand All @@ -110,7 +110,7 @@ object TestServer {
println(
"TServerEventHandler.createContext - connection #" +
ctx.connectionId +
" established"
" established",
)
return ctx
}
Expand All @@ -124,7 +124,7 @@ object TestServer {
println(
"TServerEventHandler.deleteContext - connection #" +
ctx.connectionId +
" terminated"
" terminated",
)
}

Expand All @@ -137,7 +137,7 @@ object TestServer {
println(
"TServerEventHandler.processContext - connection #" +
ctx.connectionId +
" is ready to process next request"
" is ready to process next request",
)
}
}
Expand Down Expand Up @@ -204,7 +204,7 @@ class TestServerCommand : CliktCommand() {
serverEngine.setServerEventHandler(TestServer.TestServerEventHandler())
// Run it
println(
"Starting the ${if (useSSL) "ssl server" else "server"} [$protocolType/$transportType/$serverType] on port $port"
"Starting the ${if (useSSL) "ssl server" else "server"} [$protocolType/$transportType/$serverType] on port $port",
)
serverEngine.serve()
}
Expand Down Expand Up @@ -268,7 +268,7 @@ private fun getServerEngine(
ServerType.NonBlocking -> {
val tNonblockingServerArgs = TNonblockingServer.Args(tNonblockingServerSocket)
tNonblockingServerArgs.processor(
if (isMulti) multiplexedProcessor else testProcessor
if (isMulti) multiplexedProcessor else testProcessor,
)
tNonblockingServerArgs.protocolFactory(tProtocolFactory)
tNonblockingServerArgs.transportFactory(tTransportFactory)
Expand All @@ -278,7 +278,7 @@ private fun getServerEngine(
val tThreadedSelectorServerArgs =
TThreadedSelectorServer.Args(tNonblockingServerSocket)
tThreadedSelectorServerArgs.processor(
if (isMulti) multiplexedProcessor else testProcessor
if (isMulti) multiplexedProcessor else testProcessor,
)
tThreadedSelectorServerArgs.protocolFactory(tProtocolFactory)
tThreadedSelectorServerArgs.transportFactory(tTransportFactory)
Expand Down Expand Up @@ -306,7 +306,7 @@ private fun getServerEngine(
else -> {
val tThreadPoolServerArgs = TThreadPoolServer.Args(tServerSocket)
tThreadPoolServerArgs.processor(
if (isMulti) multiplexedProcessor else testProcessor
if (isMulti) multiplexedProcessor else testProcessor,
)
tThreadPoolServerArgs.protocolFactory(tProtocolFactory)
tThreadPoolServerArgs.transportFactory(tTransportFactory)
Expand Down
Loading