Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 29, 2023
1 parent 85564d3 commit ebe886d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ void assertGenerateExecutionContext() {
SQLStatementContext sqlStatementContext = mock(CommonSQLStatementContext.class);
when(sqlStatementContext.getSqlStatement()).thenReturn(mock(SelectStatement.class));
QueryContext queryContext = new QueryContext(sqlStatementContext, "SELECT * FROM tbl", Collections.emptyList());
ResourceMetaData resourceMetaData = mock(ResourceMetaData.class, RETURNS_DEEP_STUBS);
when(resourceMetaData.getStorageUnitMetaData().getMetaDataMap()).thenReturn(Collections.emptyMap());
ShardingSphereDatabase database = new ShardingSphereDatabase(DefaultDatabase.LOGIC_NAME, mock(DatabaseType.class),
mock(ResourceMetaData.class, RETURNS_DEEP_STUBS), new RuleMetaData(mockShardingSphereRule()), Collections.emptyMap());
resourceMetaData, new RuleMetaData(mockShardingSphereRule()), Collections.emptyMap());
ConfigurationProperties props = new ConfigurationProperties(PropertiesBuilder.build(new Property(ConfigurationPropertyKey.SQL_SHOW.getKey(), Boolean.TRUE.toString())));
ExecutionContext actual = new KernelProcessor().generateExecutionContext(queryContext, database, new RuleMetaData(mockShardingSphereRule()), props,
mock(ConnectionContext.class));
Expand Down

0 comments on commit ebe886d

Please sign in to comment.