Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add startup conditions #11305

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Conversation

huangkemingyyds
Copy link
Contributor

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

#11304
XXXXX

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2023

Codecov Report

Merging #11305 (4e2c85d) into develop (f42b296) will decrease coverage by 0.09%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #11305      +/-   ##
=============================================
- Coverage      58.42%   58.33%   -0.09%     
- Complexity      5752     5754       +2     
=============================================
  Files            885      885              
  Lines          27356    27356              
  Branches        2890     2890              
=============================================
- Hits           15982    15959      -23     
- Misses         10156    10179      +23     
  Partials        1218     1218              

see 33 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f42b296...4e2c85d. Read the comment docs.

Copy link
Collaborator

@KomachiSion KomachiSion left a comment

Choose a reason for hiding this comment

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

UT should not start spring context.

@KomachiSion
Copy link
Collaborator

我看了一下错误, 可能是UT顺序问题导致的, 解决方法应该是mockEnv,而不是去启动spring context。

可以参考DistroModuleStateBuilderTest等也依赖Env的UT是如何做的。

另外,为了保证不影响其他的UT,最好在After中清理掉这个TlsConfig的instance

@huangkemingyyds
Copy link
Contributor Author

huangkemingyyds commented Oct 30, 2023 via email

@KomachiSion KomachiSion merged commit e7e3824 into alibaba:develop Nov 1, 2023
7 checks passed
lowezheng added a commit to lowezheng/nacos that referenced this pull request Nov 12, 2023
* develop: (137 commits)
  Develop refactor topn (alibaba#11352)
  Develop fill ut common (alibaba#11335)
  Optimize MapperManager (alibaba#11195)
  Simplify the validate method for serviceinfo (alibaba#11312)
  add startup conditions (alibaba#11305)
  Fix some typos (alibaba#11269)
  fix: rename tar name (alibaba#11281)
  优化节点显示,添加mode (alibaba#11275)
  [ISSUE alibaba#11253]To fix the triggering of the listener upon failover con… (alibaba#11254)
  Add description for new plugin. (alibaba#11268)
  Upgrade to 2.3.0-BETA. (alibaba#11262)
  [ISSUE alibaba#11255]Update PathEncoderManagerTest#testEncodeWithNonExistOs. (alibaba#11256)
  Fill ut for common module (alibaba#11247)
  Optimize ThreadPoolManager (alibaba#11206)
  Fix npe when setup ack response in GrpcClient (alibaba#11210)
  [ISSUE#11192] batchRegisterInstance add recalculateRevision (alibaba#11232)
  feat(alibaba#11236): Remove invalid assertion in com.alibaba.nacos.config.server.service.ConfigCacheService#dumpChange. (alibaba#11237)
  feat(11115): http support cas publish. (alibaba#11120)
  [ISSUE alibaba#11231]Optimize the handleSpringBinder method in PropertiesUtil. (alibaba#11240)
  ISSUE alibaba#11212 (alibaba#11213)
  ...

# Conflicts:
#	console-ui/package-lock.json
#	console-ui/package.json
#	console-ui/src/pages/Login/Login.jsx
#	core/src/main/java/com/alibaba/nacos/core/listener/StartingApplicationListener.java
#	pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants