This is an automated email from the ASF dual-hosted git repository.

wuweijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 78ea12b  Fix test case for #11232 (#11233)
78ea12b is described below

commit 78ea12b2547c789ba59f3a6f62dcde5ef37ae5a9
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jul 8 23:40:21 2021 +0800

    Fix test case for #11232 (#11233)
    
    * Avoid use String.format to enhance the performance
    
    * Use stream API with OrderByContextEngine
    
    * Use stream API with PaginationContextEngine
    
    * Fix test case
---
 .../binder/segment/select/orderby/engine/OrderByContextEngineTest.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/orderby/engine/OrderByContextEngineTest.java
 
b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/orderby/engine/OrderByContextEngineTest.java
index 845e8a9..28e1b13 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/orderby/engine/OrderByContextEngineTest.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-binder/src/test/java/org/apache/shardingsphere/infra/binder/segment/select/orderby/engine/OrderByContextEngineTest.java
@@ -190,6 +190,7 @@ public final class OrderByContextEngineTest {
     public void 
assertCreateOrderByContextForMySQLSelectWithoutOrderByOnPlainQuery() {
         SelectStatement selectStatement = mock(MySQLSelectStatement.class, 
RETURNS_DEEP_STUBS);
         when(selectStatement.getFrom()).thenReturn(new SimpleTableSegment(new 
TableNameSegment(0, 1, new IdentifierValue("t_order"))));
+        
when(selectStatement.getProjections().getProjections()).thenReturn(Collections.emptyList());
         GroupByContext groupByContext = new 
GroupByContext(Collections.emptyList());
         OrderByContext actualOrderByContext = new 
OrderByContextEngine().createOrderBy(getShardingSphereSchemaForMySQLSelectWithoutOrderBy(),
 selectStatement, groupByContext);
         assertTrue(actualOrderByContext.isGenerated());

Reply via email to