You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/03/08 01:30:07 UTC

[GitHub] [servicecomb-pack] coolbeevip commented on a change in pull request #745: WIP: SCB-2421 Upgrade Spring Boot 2.3.12.RELEASE and Spring Cloud Hoxton.SR12

coolbeevip commented on a change in pull request #745:
URL: https://github.com/apache/servicecomb-pack/pull/745#discussion_r821245771



##########
File path: alpha/alpha-server/src/test/java/org/apache/servicecomb/pack/alpha/server/tcc/service/TccTxEventServiceTest.java
##########
@@ -160,8 +159,8 @@ public void clearUpCompletedTxFromGlobalTxTable() {
 
     tccTxEventService.clearCompletedGlobalTx(1);
 
-    assertThat(participatedEventRepository.findByGlobalTxId(globalTxId).isPresent(), is(false));
-    assertThat(globalTxEventRepository.findByGlobalTxId(globalTxId).isPresent(), is(false));
+    assertThat(participatedEventRepository.findByGlobalTxId(globalTxId).get().isEmpty(), is(true));

Review comment:
       I think so. 
   
   See the [Null Handling of Repository Methods](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.nullability) section of the Features page. To quote:
   
   > Repository methods returning collections, collection alternatives, wrappers, and streams are guaranteed never to return null but rather the corresponding empty representation




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org