Skip to content

Raise test coverage to ≥90% (Aone #84428597)#253

Merged
yndu13 merged 2 commits into
masterfrom
feature/aone-84428597-coverage-90
Jul 20, 2026
Merged

Raise test coverage to ≥90% (Aone #84428597)#253
yndu13 merged 2 commits into
masterfrom
feature/aone-84428597-coverage-90

Conversation

@yndu13

@yndu13 yndu13 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add unit tests covering DefaultLogger/ClientLogger overloads, LogLevel null, Validate/IOUtils/HostnameVerifier success paths, and Tea helpers (null interceptor chain, toWriteable, interrupted sleep).
  • Cover OkHttp CA trust-store setup with bundled test PEMs (no CI CA secret), proxy authenticator callback, and proxy exception paths.
  • Extend TeaModel confirmType/parseObject, TeaResponse read failures, OkRequestBody contentLength, and ClientHelper cache-key fields for keepAlive/maxIdle.

Add targeted tests for logging, OkHttp CA/proxy paths, Tea helpers, and utils without relying on the CI CA secret.
Comment thread src/test/resources/test-ca-dual.pem Outdated
W/IXexXzHPe/L8FfZDD80EoEzM73D5GyhQtX488npULYyyPJTAfR5q4CHzbubq9m
kfOif6MH4s0sgDZkcPFNt5dTKj7OUIbVljINEcd6VP+I6m1Wb4vYOBttqQ9jLgLm
8hc09omOX3/qlRvQuQbdGNaAwRLE8DNtdR9rFIG3Gm2MZaVwDwQnRaeF+uKcFL9u
MRIs49xwswJtg+AFGO6D

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些证书是否都是假的,如果是真的,不能直接写在代码里。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认:原先 PEM 是 CN=test.local 的自签测试夹具,不是生产证书,也未提交私钥。

为消除「真证书入库」疑虑,已删除 src/test/resources/test-ca*.pem,改为单测运行时用 keytool 生成 ephemeral 自签 CA(OU=UnitTestFixture),覆盖路径不变。请 re-review。

@yndu13
yndu13 merged commit 043fcd2 into master Jul 20, 2026
7 checks passed
@yndu13
yndu13 deleted the feature/aone-84428597-coverage-90 branch July 20, 2026 12:38
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.

1 participant