Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(script): 注释掉无用命令及代码、固定ci中golangci-lint的版本使其与setup.sh中版本保持一致 #220

Merged
merged 4 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [merger: 使用 sqlx.Scanner 来读取数据](https://github.com/ecodeclub/eorm/pull/216)
- [rows, merger: 使用 sqlx.Rows 作为接口,并重构 merger 包 ](https://github.com/ecodeclub/eorm/pull/217)
- [rows: 同库事务语句合并执行,提前读取所有数据](https://github.com/ecodeclub/eorm/pull/219)
- [script: 注释掉无用命令及代码、固定ci中golangci-lint的版本使其与setup.sh中版本保持一致](https://github.com/ecodeclub/eorm/pull/220)
## v0.0.1:
- [Init Project](https://github.com/ecodeclub/eorm/pull/1)
- [Selector Definition](https://github.com/ecodeclub/eorm/pull/2)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
version: "v1.52.2"

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 4 additions & 0 deletions internal/datasource/transaction/delay_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ func (s *TestDelayTxTestSuite) TestExecute_Commit_Or_Rollback() {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
s.SetupTest()

tc.mockOrder(s.mockMaster, s.mockMaster2)
tx, err := tc.txFunc()
require.NoError(t, err)
Expand All @@ -508,6 +510,8 @@ func (s *TestDelayTxTestSuite) TestExecute_Commit_Or_Rollback() {
require.NoError(t, err)
assert.Equal(t, tc.wantAffected, affected)
tc.afterFunc(t, tx, values)

s.TearDownTest()
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion script/integrate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -e
docker compose -f script/integration_test_compose.yml down
docker compose -f script/integration_test_compose.yml up -d
echo "127.0.0.1 slave.a.com" >> /etc/hosts
#sudo echo "127.0.0.1 slave.a.com" >> /etc/hosts
go test -timeout=30m -race ./... -tags=e2e
docker compose -f script/integration_test_compose.yml down
3 changes: 1 addition & 2 deletions sharding_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package eorm

import (
"context"
"sync"

"github.com/ecodeclub/eorm/internal/merger/batchmerger"

Expand All @@ -30,7 +29,7 @@ type ShardingSelector[T any] struct {
shardingSelectorBuilder
table *T
db Session
lock sync.Mutex
// lock sync.Mutex
}

func NewShardingSelector[T any](db Session) *ShardingSelector[T] {
Expand Down
Loading