fix: error after sync

This commit is contained in:
Gaukas Wang 2023-10-26 22:48:59 -06:00
parent 7c77243b04
commit 77691ccce8
No known key found for this signature in database
GPG key ID: 9E2F8986D76F8B5D
16 changed files with 39 additions and 87 deletions

View file

@ -3,9 +3,9 @@ package ackhandler
import (
"fmt"
"github.com/quic-go/quic-go/internal/protocol"
"github.com/quic-go/quic-go/internal/utils"
"github.com/quic-go/quic-go/logging"
"github.com/refraction-networking/uquic/internal/protocol"
"github.com/refraction-networking/uquic/internal/utils"
"github.com/refraction-networking/uquic/logging"
)
type ecnState uint8

View file

@ -1,10 +1,10 @@
package ackhandler
import (
mocklogging "github.com/quic-go/quic-go/internal/mocks/logging"
"github.com/quic-go/quic-go/internal/protocol"
"github.com/quic-go/quic-go/internal/utils"
"github.com/quic-go/quic-go/logging"
mocklogging "github.com/refraction-networking/uquic/internal/mocks/logging"
"github.com/refraction-networking/uquic/internal/protocol"
"github.com/refraction-networking/uquic/internal/utils"
"github.com/refraction-networking/uquic/logging"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

View file

@ -1,9 +1,9 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: ECNHandler)
// Source: github.com/refraction-networking/uquic/internal/ackhandler (interfaces: ECNHandler)
//
// Generated by this command:
//
// mockgen -build_flags=-tags=gomock -package ackhandler -destination mock_ecn_handler_test.go github.com/quic-go/quic-go/internal/ackhandler ECNHandler
// mockgen -build_flags=-tags=gomock -package ackhandler -destination mock_ecn_handler_test.go github.com/refraction-networking/uquic/internal/ackhandler ECNHandler
//
// Package ackhandler is a generated GoMock package.
package ackhandler
@ -11,7 +11,7 @@ package ackhandler
import (
reflect "reflect"
protocol "github.com/quic-go/quic-go/internal/protocol"
protocol "github.com/refraction-networking/uquic/internal/protocol"
gomock "go.uber.org/mock/gomock"
)

View file

@ -5,5 +5,5 @@ package ackhandler
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/refraction-networking/uquic/internal/ackhandler SentPacketTracker"
type SentPacketTracker = sentPacketTracker
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_ecn_handler_test.go github.com/quic-go/quic-go/internal/ackhandler ECNHandler"
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_ecn_handler_test.go github.com/refraction-networking/uquic/internal/ackhandler ECNHandler"
type ECNHandler = ecnHandler

View file

@ -12,11 +12,12 @@ func NewUAckHandler(
initialMaxDatagramSize protocol.ByteCount,
rttStats *utils.RTTStats,
clientAddressValidated bool,
enableECN bool,
pers protocol.Perspective,
tracer logging.ConnectionTracer,
tracer *logging.ConnectionTracer,
logger utils.Logger,
) (SentPacketHandler, ReceivedPacketHandler) {
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, pers, tracer, logger)
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, enableECN, pers, tracer, logger)
return &uSentPacketHandler{
sentPacketHandler: sph,
}, newReceivedPacketHandler(sph, rttStats, logger)

View file

@ -34,7 +34,7 @@ type uCryptoSetup struct {
rttStats *utils.RTTStats
tracer logging.ConnectionTracer
tracer *logging.ConnectionTracer
logger utils.Logger
perspective protocol.Perspective
@ -69,7 +69,7 @@ func NewUCryptoSetupClient(
tlsConf *tls.Config,
enable0RTT bool,
rttStats *utils.RTTStats,
tracer logging.ConnectionTracer,
tracer *logging.ConnectionTracer,
logger utils.Logger,
version protocol.VersionNumber,
chs *tls.ClientHelloSpec,
@ -100,7 +100,7 @@ func newUCryptoSetup(
connID protocol.ConnectionID,
tp *wire.TransportParameters,
rttStats *utils.RTTStats,
tracer logging.ConnectionTracer,
tracer *logging.ConnectionTracer,
logger utils.Logger,
perspective protocol.Perspective,
version protocol.VersionNumber,

View file

@ -6,17 +6,17 @@ import (
"net"
"time"
"github.com/quic-go/quic-go/logging"
"github.com/refraction-networking/uquic/logging"
)
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/tracer.go github.com/quic-go/quic-go/internal/mocks/logging Tracer"
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/tracer.go github.com/refraction-networking/uquic/internal/mocks/logging Tracer"
type Tracer interface {
SentPacket(net.Addr, *logging.Header, logging.ByteCount, []logging.Frame)
SentVersionNegotiationPacket(_ net.Addr, dest, src logging.ArbitraryLenConnectionID, _ []logging.VersionNumber)
DroppedPacket(net.Addr, logging.PacketType, logging.ByteCount, logging.PacketDropReason)
}
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/connection_tracer.go github.com/quic-go/quic-go/internal/mocks/logging ConnectionTracer"
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/connection_tracer.go github.com/refraction-networking/uquic/internal/mocks/logging ConnectionTracer"
type ConnectionTracer interface {
StartedConnection(local, remote net.Addr, srcConnID, destConnID logging.ConnectionID)
NegotiatedVersion(chosen logging.VersionNumber, clientVersions, serverVersions []logging.VersionNumber)

View file

@ -82,7 +82,7 @@ var _ = Describe("Log", func() {
DefaultLogger.Infof("info")
t, err := time.Parse(format, b.String()[:b.Len()-6])
Expect(err).ToNot(HaveOccurred())
Expect(t).To(BeTemporally("~", time.Now(), 25*time.Hour))
Expect(t).To(BeTemporally("~", time.Now(), 48*time.Hour))
})
It("says whether debug is enabled", func() {