Skip to content

Commit

Permalink
Add test for ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Sep 16, 2023
1 parent a5bda9c commit f9ac4e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion network/network_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func CollectAndComparePrometheusMetrics(t *testing.T) {
gatewayd_bytes_sent_to_server_sum 282
gatewayd_bytes_sent_to_server_count 5
gatewayd_client_connections 1
gatewayd_plugin_hooks_executed_total 10
gatewayd_plugin_hooks_executed_total 11
gatewayd_plugin_hooks_registered_total 0
gatewayd_plugins_loaded_total 0
gatewayd_proxied_connections 1
Expand All @@ -122,6 +122,7 @@ func CollectAndComparePrometheusMetrics(t *testing.T) {
gatewayd_server_connections 5
gatewayd_traffic_bytes_sum 182
gatewayd_traffic_bytes_count 4
gatewayd_server_ticks_fired_total 1
`

metrics = []string{
Expand All @@ -139,6 +140,7 @@ func CollectAndComparePrometheusMetrics(t *testing.T) {
"gatewayd_proxy_passthroughs_total",
"gatewayd_server_connections",
"gatewayd_traffic_bytes",
"gatewayd_server_ticks_fired_total",
}
)
assert.NoError(t,
Expand Down
1 change: 1 addition & 0 deletions network/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func TestRunServer(t *testing.T) {
gnet.WithMulticore(false),
gnet.WithReuseAddr(true),
gnet.WithReusePort(true),
gnet.WithTicker(true), // Enable ticker.
},
proxy,
logger,
Expand Down

0 comments on commit f9ac4e5

Please sign in to comment.