Skip to content

Commit

Permalink
Update Pooling testcases (#252)
Browse files Browse the repository at this point in the history
Update actions version in go.yml to use Nodejs20

---------

Co-authored-by: Vikas Mathur <vmathur@waldevdbctgol01.dev.rocketsoftware.com>
Co-authored-by: Bimal Kumar Jha <bjha@rocketsoftware.com>
  • Loading branch information
3 people authored Aug 31, 2024
1 parent 0b53bc6 commit fc82a78
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.22.5'

Expand All @@ -38,6 +38,7 @@ jobs:
- name: Test
env:
DB2_CONNSTR: ${{ secrets.DB2_CONNSTR }}
if: ${{ env.DB2_CONNSTR != '' && env.DB2_CONNSTR != null }}
run: |
pwd
cd testdata
Expand Down
16 changes: 12 additions & 4 deletions testdata/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,12 @@ func ConnectionPool() int {
var flag int
flag = 0

db := Createconnection()
defer db.Close()
errCreatetable := Createtable();
if errCreatetable != nil {
fmt.Println("Createtable error: ", errCreatetable)
return 0
}
Insert()

pool := a.Pconnect("PoolSize=5")

Expand Down Expand Up @@ -589,8 +593,12 @@ func ConnectionPoolWithTimeout() int {
var flag int
flag = 0

db := Createconnection()
defer db.Close()
errCreatetable := Createtable();
if errCreatetable != nil {
fmt.Println("Createtable error: ", errCreatetable)
return 0
}
Insert()

pool := a.Pconnect("PoolSize=3")

Expand Down

0 comments on commit fc82a78

Please sign in to comment.