Skip to content

Commit

Permalink
test: reduce memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jan 4, 2021
1 parent cdc783b commit 5bf9514
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions caddy/caddy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func TestMercure(t *testing.T) {
mercure {
anonymous
publisher_jwt !ChangeMe!
cache_size_approx 0
}
respond 404
Expand Down Expand Up @@ -101,6 +102,7 @@ func TestJWTPlaceholders(t *testing.T) {
mercure {
anonymous
publisher_jwt {env.TEST_JWT_KEY} {env.TEST_JWT_ALG}
cache_size_approx 0
}
respond 404
Expand Down
1 change: 1 addition & 0 deletions hub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestNewHubWithConfig(t *testing.T) {
h, err := NewHub(
WithPublisherJWT([]byte("foo"), jwt.SigningMethodHS256.Name),
WithSubscriberJWT([]byte("bar"), jwt.SigningMethodHS256.Name),
WithCacheSizeApprox(0),
)
require.NotNil(t, h)
require.Nil(t, err)
Expand Down
4 changes: 2 additions & 2 deletions topic_selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

func TestMatch(t *testing.T) {
cache, _ := ristretto.NewCache(&ristretto.Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
NumCounters: 1000,
MaxCost: 100,
BufferItems: 64,
})
tss := &topicSelectorStore{cache}
Expand Down

0 comments on commit 5bf9514

Please sign in to comment.