Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyisaev2 committed Dec 26, 2024
1 parent 8c58ea8 commit 6112727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/server/datasource/rdbms/datasource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestReadSplit(t *testing.T) {
}

connection := &rdbms_utils.ConnectionMock{}
connection.On("From").Return("", "example_1").Twice()
connection.On("From").Return("", "example_1").Once()

connectionManager.On("Make", split.Select.DataSourceInstance).Return([]rdbms_utils.Connection{connection}, nil).Once()
connectionManager.On("Release", []rdbms_utils.Connection{connection}).Return().Once()
Expand Down Expand Up @@ -124,7 +124,7 @@ func TestReadSplit(t *testing.T) {
}

connection := &rdbms_utils.ConnectionMock{}
connection.On("From").Return("", "example_1").Twice()
connection.On("From").Return("", "example_1").Once()

connectionManager.On("Make", split.Select.DataSourceInstance).Return([]rdbms_utils.Connection{connection}, nil).Once()
connectionManager.On("Release", []rdbms_utils.Connection{connection}).Return().Once()
Expand Down
2 changes: 1 addition & 1 deletion app/server/streaming/streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (tc testCaseStreaming) execute(t *testing.T) {
stream.On("Context").Return(ctx)

connection := &rdbms_utils.ConnectionMock{}
connection.On("From").Return("", "example_1").Twice()
connection.On("From").Return("", "example_1").Once()

connectionManager := &rdbms_utils.ConnectionManagerMock{}
connectionManager.On("Make", split.Select.DataSourceInstance).Return([]rdbms_utils.Connection{connection}, nil).Once()
Expand Down

0 comments on commit 6112727

Please sign in to comment.