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

fix(6509): improve the test case coverage of saga module to 70% #6519

Open
wants to merge 21 commits into
base: 2.x
Choose a base branch
from

Conversation

xjlgod
Copy link
Contributor

@xjlgod xjlgod commented May 5, 2024

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

fix #6509

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@slievrly
Copy link
Member

slievrly commented May 8, 2024

@xjlgod You can submit your PR in stages.

@xjlgod
Copy link
Contributor Author

xjlgod commented May 8, 2024

@xjlgod You can submit your PR in stages.

I am trying to invoke codecov action to see my test case coverage by add new commit. But I find the error is

'Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 2244s.

It seems that the quota limit has been reached.

xjlgod added 3 commits May 9, 2024 21:08
… into feature/2.x-saga-test

# Conflicts:
#	saga/seata-saga-spring/src/test/java/org/apache/seata/saga/engine/tm/DefaultSagaTransactionalTemplateTest.java
#	saga/seata-saga-spring/src/test/java/org/apache/seata/saga/engine/tm/MockGlobalTransaction.java
@xjlgod xjlgod changed the title [WIP]fix(6509): improve the test case coverage of [saga] module to 70% fix(6509): improve the test case coverage of [saga] module to 70% May 11, 2024
@xjlgod xjlgod marked this pull request as ready for review May 11, 2024 13:56
import java.util.Map;

/**
* @author jingliu_xiong@foxmail.com
Copy link
Contributor

Choose a reason for hiding this comment

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

delete the author infomation,as well as below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have deleted it.

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.57%. Comparing base (8b58f85) to head (54ad9e0).
Report is 17 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6519      +/-   ##
============================================
+ Coverage     50.02%   51.57%   +1.55%     
- Complexity     5224     5597     +373     
============================================
  Files           950     1005      +55     
  Lines         33447    34749    +1302     
  Branches       4047     4138      +91     
============================================
+ Hits          16732    17922    +1190     
+ Misses        15104    15033      -71     
- Partials       1611     1794     +183     

see 126 files with indirect coverage changes

@xjlgod xjlgod closed this May 26, 2024
@xjlgod xjlgod reopened this May 26, 2024
@xjlgod xjlgod changed the title fix(6509): improve the test case coverage of [saga] module to 70% fix(6509): improve the test case coverage of saga module to 70% May 26, 2024
changes/en-us/2.x.md Outdated Show resolved Hide resolved
@@ -155,6 +155,7 @@
- [[#6456](https://github.com/apache/incubator-seata/pull/6456)] 调整动态配置监听测试用例
- [[#6466](https://github.com/apache/incubator-seata/pull/6466)] 支持redis的集成测试
- [[#6484](https://github.com/apache/incubator-seata/pull/6484)] 修复FileConfigurationTest和MockServerTest失败
- [[#6519](https://github.com/apache/incubator-seata/pull/6484)] 增加saga模块的测试用例覆盖率
Copy link
Contributor

Choose a reason for hiding this comment

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

6519

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix it.

public void testCreateExpression() {
SpringELExpressionFactory factory = new SpringELExpressionFactory(null);
factory.createExpression("'Hello World'.concat('!')");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

need assert result,not only call method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix it.

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.

task: Improve the test case coverage of [saga] module to 70%
5 participants