test(设备网关): 补充TCP上行监控回归测试 - #789
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
核心变动
tcp-component新增TcpServerDeviceGatewayMonitorTest。58ce9fcae test(设备网关): 补充TCP上行监控回归测试设计与测试目标
context.handleMessage(...)手动上报、codec 返回消息、平台处理及 monitor 包装完整路径;断言每条消息只处理一次。FluxTracer。测试结果
JAVA_HOME=$(/usr/libexec/java_home -v 17) mvn -o -pl jetlinks-components/network-component/tcp-component -am -Dtest=TcpServerDeviceGatewayMonitorTest -Dsurefire.failIfNoSpecifiedTests=false test8afa4e3fcf52aae04e93ac4506a4251e5b66c97b定向补跑;提交后 Git tree 未变化,可直接复用。TcpServerDeviceGatewayMonitorTest#manualAndReturnedTcpUpstreamShouldUseMonitorChainOnce。handleTcpMessage0行覆盖 17/19(89.5%)、分支覆盖 3/6(50%);TcpConnection行覆盖 91/134(67.9%)。文档同步情况
风险与说明
tcp-component测试源码。FromDeviceMessageContext的空流契约,本测试不把该错误用法视为网关自动去重责任。58ce9fcae即可,仅删除新增测试。