Skip to content

Commit

Permalink
Fix: test DstPort type
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Aug 21, 2023
1 parent c70c08a commit 651a369
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/clash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,15 @@ func testPacketConnTimeout(t *testing.T, pc net.PacketConn) error {
func testSuit(t *testing.T, proxy C.ProxyAdapter) {
conn, err := proxy.DialContext(context.Background(), &C.Metadata{
Host: localIP.String(),
DstPort: "10001",
DstPort: 10001,
})
require.NoError(t, err)
defer conn.Close()
assert.NoError(t, testPingPongWithConn(t, conn))

conn, err = proxy.DialContext(context.Background(), &C.Metadata{
Host: localIP.String(),
DstPort: "10001",
DstPort: 10001,
})
require.NoError(t, err)
defer conn.Close()
Expand All @@ -571,7 +571,7 @@ func testSuit(t *testing.T, proxy C.ProxyAdapter) {
pc, err := proxy.ListenPacketContext(context.Background(), &C.Metadata{
NetWork: C.UDP,
DstIP: localIP,
DstPort: "10001",
DstPort: 10001,
})
require.NoError(t, err)
defer pc.Close()
Expand All @@ -581,7 +581,7 @@ func testSuit(t *testing.T, proxy C.ProxyAdapter) {
pc, err = proxy.ListenPacketContext(context.Background(), &C.Metadata{
NetWork: C.UDP,
DstIP: localIP,
DstPort: "10001",
DstPort: 10001,
})
require.NoError(t, err)
defer pc.Close()
Expand All @@ -591,7 +591,7 @@ func testSuit(t *testing.T, proxy C.ProxyAdapter) {
pc, err = proxy.ListenPacketContext(context.Background(), &C.Metadata{
NetWork: C.UDP,
DstIP: localIP,
DstPort: "10001",
DstPort: 10001,
})
require.NoError(t, err)
defer pc.Close()
Expand Down Expand Up @@ -628,7 +628,7 @@ func benchmarkProxy(b *testing.B, proxy C.ProxyAdapter) {

conn, err := proxy.DialContext(context.Background(), &C.Metadata{
Host: localIP.String(),
DstPort: "10001",
DstPort: 10001,
})
require.NoError(b, err)

Expand Down

0 comments on commit 651a369

Please sign in to comment.