shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Add more unit tests for the class of `AutoCommitUtils`

Open FlyingZC opened this issue 3 years ago • 1 comments

Hi community, This issue is for #20305

Aim

Add more unit tests for the class of org.apache.shardingsphere.transaction.utils.AutoCommitUtils.

Basic Qualifications

  • Java
  • Maven
  • Transaction

Detail

Maybe you can mock the sqlStatement like new MySQLSelectStatement(),new MySQLAlterTableStatement()... and assert the result of needOpenTransaction method.

FlyingZC avatar Aug 22 '22 07:08 FlyingZC

You can check the test coverage on this page: https://app.codecov.io/gh/apache/shardingsphere image

FlyingZC avatar Aug 22 '22 07:08 FlyingZC

@strongduanmu - I have created a PR - https://github.com/apache/shardingsphere/pull/21332. Can you please review?

abhinav-koppula avatar Oct 03 '22 14:10 abhinav-koppula

@abhinav-koppula Thank you for your remind, I will review this pr.

strongduanmu avatar Oct 04 '22 01:10 strongduanmu