func newLongPoolForTest(peerAddr, global int, timeout time.Duration) *LongPool {
	cfg := connpool.IdleConfig{
		MaxIdlePerAddress: peerAddr,
		MaxIdleGlobal:     global,
		MaxIdleTimeout:    timeout,
	}
	lp := NewLongPool("test", cfg)
	limit := utils.NewMaxCounter(global)
	lp.newPeer = func(addr net.Addr) *peer {
		return newPeer("test", addr, peerAddr, timeout, limit)
	}
	return lp
}
fakeNewLongPool creates a LongPool object and modifies it to fit tests.
package connpool
import (
	"context"
	"errors"
	"fmt"
	"math/rand"
	"net"
	"sync"
	"testing"
	"time"
	"github.com/cloudwego/kitex/internal/mocks"
	"github.com/cloudwego/kitex/internal/test"
	"github.com/cloudwego/kitex/pkg/connpool"
	dialer "github.com/cloudwego/kitex/pkg/remote"
	"github.com/cloudwego/kitex/pkg/utils"
)
var (
	mockAddr0 = "127.0.0.1:8000"
	mockAddr1 = "127.0.0.1:8001"
)