Skip to content

Commit

Permalink
Fix tests and update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Apr 17, 2019
1 parent 182207d commit b8aec4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/oracledb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"
"sync"
"time"
"time"

sdkArgs "github.com/newrelic/infra-integrations-sdk/args"
"github.com/newrelic/infra-integrations-sdk/integration"
Expand Down Expand Up @@ -52,8 +52,8 @@ func main() {

db, err := sql.Open("goracle", getConnectionString())
exitOnErr(err)
db.SetMaxIdleConns(10)
db.SetConnMaxLifetime(time.Minute * 1)
db.SetMaxIdleConns(10)
db.SetConnMaxLifetime(time.Minute * 1)

defer func() {
if err := db.Close(); err != nil {
Expand Down Expand Up @@ -89,13 +89,13 @@ func main() {
func getConnectionString() string {

cp := goracle.ConnectionParams{
Username: args.Username,
Password: args.Password,
SID: fmt.Sprintf("%s:%s/%s", args.Hostname, args.Port, args.ServiceName),
IsSysDBA: args.IsSysDBA,
IsSysOper: args.IsSysOper,
MinSessions: 10,
MaxSessions: 10,
Username: args.Username,
Password: args.Password,
SID: fmt.Sprintf("%s:%s/%s", args.Hostname, args.Port, args.ServiceName),
IsSysDBA: args.IsSysDBA,
IsSysOper: args.IsSysOper,
MinSessions: 10,
MaxSessions: 10,
PoolIncrement: 0,
}

Expand Down
2 changes: 1 addition & 1 deletion src/oracledb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestGetCollectionString(t *testing.T) {
}

s := getConnectionString()
expectedConnectionString := `oracle://testuser:testpassword@testhost:/testservice?connectionClass=&poolIncrement=0&poolMaxSessions=8&poolMinSessions=0&sysdba=1&sysoper=0&standaloneConnection=0`
expectedConnectionString := `oracle://testuser:testpassword@testhost:/testservice?connectionClass=&poolIncrement=0&poolMaxSessions=10&poolMinSessions=10&sysdba=1&sysoper=0&standaloneConnection=0`

if s != expectedConnectionString {
t.Errorf("Incorrect connection string %s", s)
Expand Down

0 comments on commit b8aec4c

Please sign in to comment.