Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
strongduanmu committed Dec 26, 2024
1 parent 8720f9b commit 8a374fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private ConnectionSession mockConnectionSession() throws SQLException {
SQLStatementContext sqlStatementContext = mock(InsertStatementContext.class);
when(sqlStatementContext.getSqlStatement()).thenReturn(parserEngine.parse(SQL, false));
when(result.getCurrentDatabaseName()).thenReturn("foo_db");
when(result.getUsedDatabaseName()).thenReturn("foo_db");
ConnectionContext connectionContext = new ConnectionContext(Collections::emptySet);
connectionContext.setCurrentDatabaseName("foo_db");
when(result.getConnectionContext()).thenReturn(connectionContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private ContextManager mockContextManager() {
private ConnectionSession mockConnectionSession() {
ConnectionSession result = mock(ConnectionSession.class);
when(result.getCurrentDatabaseName()).thenReturn("db");
when(result.getUsedDatabaseName()).thenReturn("db");
when(result.getDatabaseConnectionManager()).thenReturn(databaseConnectionManager);
when(result.getStatementManager()).thenReturn(backendStatement);
ConnectionContext connectionContext = new ConnectionContext(Collections::emptySet);
Expand Down

0 comments on commit 8a374fb

Please sign in to comment.