Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP and TCP clients for testing #448

Closed
wants to merge 3 commits into from

Conversation

samutamm
Copy link
Contributor

@samutamm samutamm commented Dec 30, 2021

Add dummy TCP and UDP clients to facilitate reviewing and testing #234.

Dummy TCP test

Simple TCP test case on single machine:

  1. Start easegress-server (based on add tcp/udp proxy feature #234) and create following object:
kind: TCPServer
name: tcp-server-demo
port: 10080
maxConns: 1024
connectTimeout: 3000
pool:
  servers:
    - url: '127.0.0.1:9095'
  loadBalance:
    policy: roundRobin
  1. Start dummy TCP backend proxy go run example/backend-service/echo/echo.go tcp
  2. Run dummy TCP client program go run example/client/tcp_udp.go tcp
  3. Observe messages passing.

Dummy UDP test

  1. Start easegress-server and create following object:
kind: UDPServer
name: udp-server-demo
port: 10070
maxConns: 1024
hasResponse: true
clientIdleTimeout: 30000
serverIdleTimeout: 30000
pool:
  servers:
    - url: '127.0.0.1:9095'
  loadBalance:
    policy: roundRobin
ipFilters:
  blockByDefault: false
  allowIPs:
    - 127.0.0.1
  1. Run go run example/backend-service/echo/echo.go udp
  2. Run go run example/client/tcp_udp.go udp
  3. Observe messages passing.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2021

Codecov Report

Merging #448 (645b737) into main (b3a7327) will increase coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #448      +/-   ##
==========================================
+ Coverage   80.47%   80.69%   +0.21%     
==========================================
  Files          70       70              
  Lines        8094     8154      +60     
==========================================
+ Hits         6514     6580      +66     
+ Misses       1222     1218       -4     
+ Partials      358      356       -2     
Impacted Files Coverage Δ
pkg/filter/mock/mock.go 90.42% <0.00%> (-4.66%) ⬇️
pkg/filter/proxy/pool.go 80.00% <0.00%> (-2.66%) ⬇️
pkg/object/meshcontroller/spec/spec.go 87.20% <0.00%> (+0.07%) ⬆️
pkg/util/urlclusteranalyzer/urlclusteranalyzer.go 96.10% <0.00%> (+0.38%) ⬆️
pkg/util/jmxtool/agent_controller.go 66.66% <0.00%> (+1.96%) ⬆️
pkg/cluster/cluster.go 52.72% <0.00%> (+2.04%) ⬆️
pkg/filter/proxy/request.go 95.31% <0.00%> (+9.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3a7327...645b737. Read the comment docs.

@samutamm samutamm marked this pull request as ready for review December 31, 2021 02:54
@localvar
Copy link
Collaborator

@samutamm , I think we should merge this PR after the TCP/UDP pr, because there's no TCPServer or UDPServer yet.

or, could @jxd134 help add the dummy clients to the TCP/UDP pr directly?

@jxd134
Copy link
Contributor

jxd134 commented Dec 31, 2021

@samutamm , I think we should merge this PR after the TCP/UDP pr, because there's no TCPServer or UDPServer yet.

or, could @jxd134 help add the dummy clients to the TCP/UDP pr directly?

It will be all right.
See how @samutamm choose.

@samutamm
Copy link
Contributor Author

samutamm commented Jan 4, 2022

@samutamm , I think we should merge this PR after the TCP/UDP pr, because there's no TCPServer or UDPServer yet.
or, could @jxd134 help add the dummy clients to the TCP/UDP pr directly?

It will be all right. See how @samutamm choose.

@jxd134 It would be simpler if you include this kind of dummy clients and maybe the echo server modifications to #234, then we could close this PR #448 .

@jxd134
Copy link
Contributor

jxd134 commented Jan 4, 2022

@samutamm , I think we should merge this PR after the TCP/UDP pr, because there's no TCPServer or UDPServer yet.
or, could @jxd134 help add the dummy clients to the TCP/UDP pr directly?

It will be all right. See how @samutamm choose.

@jxd134 It would be simpler if you include this kind of dummy clients and maybe the echo server modifications to #234, then we could close this PR #448 .

Get it.

@samutamm
Copy link
Contributor Author

samutamm commented Jan 5, 2022

Close as changes included in #234

@samutamm samutamm closed this Jan 5, 2022
@samutamm samutamm deleted the udp-tcp-test-clients branch January 5, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants