Skip to content

fix(dialtesting): require responses for TCP message assertions - #211

Merged
leecha merged 2 commits into
mainfrom
feat-tcp-connection-validation
Oct 21, 2026
Merged

leecha merged 2 commits into
mainfrom
feat-tcp-connection-validation

Conversation

@NaR82n

@NaR82n NaR82n commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

For TCP tasks with nonempty connection assertions, response-message assertions now require an actual response. Refused or timed-out connections cannot satisfy negative message checks using the default empty string. A matching connection assertion can still satisfy OR, and response availability resets between runs. Tasks without connection assertions retain their existing message semantics.

Empty, null, and omitted connection fields keep the existing behavior: they do not enable the new connection mode. They remain equivalent when omitempty serialization removes an empty array. Compatibility tests verify that connection failures still fail in this mode; an empty array does not make failed connections succeed. Existing validation of nonempty elements, operators, and targets is unchanged.

Follow-up to #210 and the review on DataKit !4227. The empty-array review concern is addressed through an explicit compatibility contract and regression tests rather than rejecting a previously accepted optional field. Final production diff adds seven lines and no public fields or execution features.

Validation:

  • Full dialtesting package tests passed after the compatibility adjustment.
  • TCP connection race tests passed.
  • TCP tests passed three times in an isolated network with real SYN packet drops, including the three-second timeout case.
  • Compatibility tests cover empty/omitted/null arrays, existing response-time rules, valid rules mixed with empty arrays, and established/refused/timeout outcomes.
  • Response regression tests cover AND/OR, negative and empty-string-matching rules, a received response, and reset between runs.
  • Incremental golangci-lint reports zero issues.
  • Full-repository checks retain unrelated limitations: lint reports 67 issues outside this change, copyright checking reports 73 unchanged files, and the earlier make test run did not finish within a 240-second local bound. Completed packages, including dialtesting, passed.

DataKit and kodo synchronization is paused at the user's request.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhangwenjie seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@NaR82n NaR82n changed the title fix(dialtesting): validate TCP rules and missing responses fix(dialtesting): require responses for TCP message assertions Oct 21, 2026
@leecha
leecha merged commit af113ac into main Oct 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants