package db

import (
	"testing"
	"time"
)

func TestDbConn(t *testing.T) {
	conn := func(name string) {
		t.Log("\t", name)

		if c1, err1 := Client(); err1 != nil {
			t.Error(err1)
		} else {
			defer Release(c1)
		}
		time.Sleep(2 * time.Second)
	}

	go conn("c1")
	conn("c2")
	conn("c3")
}

/**
 * go test -f ../../config.json 
 */

package db

import (
	"testing"
	"time"
)

func TestDbConn(t *testing.T) {
	conn := func(name string) {
		t.Log("\t", name)

		if c1, err1 := Client(); err1 != nil {
			t.Error(err1)
		} else {
			defer Release(c1)
		}
		time.Sleep(2 * time.Second)
	}

	go conn("c1")
	conn("c2")
	conn("c3")
}

Add comment for db test
Add comment for db test

All network i/o tests require config file, so run test with -f flag,
e.g.:
go test -f ../../config.json
