Skip to content

Commit

Permalink
endless loop
Browse files Browse the repository at this point in the history
  • Loading branch information
omniskop committed Jan 20, 2024
1 parent 4f84925 commit 1e40227
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ require (
gorm.io/plugin/dbresolver v1.5.0 // indirect
)

replace gorm.io/gorm => ./gorm
replace gorm.io/gorm => ./gorm
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func TestGORM(t *testing.T) {

DB.Create(&user)

var result User
if err := DB.First(&result, user.ID).Error; err != nil {
var intf interface{} = user
if err := DB.Save(&intf).Error; err != nil {
t.Errorf("Failed, got error: %v", err)
}
}
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ for dialect in "${dialects[@]}" ; do
if [[ $(grep TEST_DRIVER main_test.go) =~ "${dialect}" ]]
then
echo "testing ${dialect}..."
GORM_DIALECT=${dialect} go test -race -count=1 -v ./...
GORM_DIALECT=${dialect} go test -race -count=1 -timeout 30s -v ./...
else
echo "skip ${dialect}..."
fi
Expand Down

0 comments on commit 1e40227

Please sign in to comment.