Use dynamic port number in benchmark

This commit is contained in:
Marco Primi
2023-09-01 08:33:43 -07:00
parent db96238ad9
commit bbf42c1f57
6 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# Simple TLS (ed25519) config file
listen: 127.0.0.1:4443
listen: 127.0.0.1:-1
tls {
cert_file: "./configs/certs/tls/benchmark-server-cert-ed25519.pem"

View File

@@ -1,4 +1,4 @@
# Simple config file
listen: 127.0.0.1:4443
listen: 127.0.0.1:-1

View File

@@ -1,6 +1,6 @@
# Simple TLS (rsa-1024) config file
listen: 127.0.0.1:4443
listen: 127.0.0.1:-1
tls {
cert_file: "./configs/certs/tls/benchmark-server-cert-rsa-1024.pem"

View File

@@ -1,6 +1,6 @@
# Simple TLS (rsa-2048) config file
listen: 127.0.0.1:4443
listen: 127.0.0.1:-1
tls {
cert_file: "./configs/certs/tls/benchmark-server-cert-rsa-2048.pem"

View File

@@ -1,6 +1,6 @@
# Simple TLS (rsa-4096) config file
listen: 127.0.0.1:4443
listen: 127.0.0.1:-1
tls {
cert_file: "./configs/certs/tls/benchmark-server-cert-rsa-4096.pem"

View File

@@ -54,9 +54,9 @@ func BenchmarkRequestReplyOverEncryptedConnection(b *testing.B) {
// run server with tls scheme
server, _ := RunServerWithConfig(schemeConfig)
opts := defaultOpts
defer server.Shutdown()
opts := defaultOpts
if keyType != "none" {
opts = append(opts, nats.Secure(&tls.Config{
InsecureSkipVerify: true,