uranusjr commented on code in PR #75920:
URL: https://github.com/apache/airflow/pull/75920#discussion_r4410691374
##########
java-sdk/sdk/src/test/kotlin/org/apache/airflow/sdk/execution/CommTest.kt:
##########
@@ -202,6 +202,25 @@ class CommsTest {
return out.toByteArray()
}
+ private fun variableNotFoundResponseFrame(id: Int): ByteArray {
+ val out = ByteArrayOutputStream()
+ MessagePack.newDefaultPacker(out).use { packer ->
+ packer.packArrayHeader(3)
+ packer.packInt(id)
+ packer.packNil()
+ packer.packMapHeader(3)
+ packer.packString("type")
+ packer.packString("ErrorResponse")
+ packer.packString("error")
+ packer.packString("VARIABLE_NOT_FOUND")
+ packer.packString("detail")
+ packer.packMapHeader(1)
+ packer.packString("key")
+ packer.packString("optional_setting")
+ }
+ return out.toByteArray()
+ }
Review Comment:
This can probably be parametrized and reused across tests. Currently a bunch
of tests duplicate the frame build for their own, and they are all pretty
similar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]