Skip to content

Commit

Permalink
Fix stress test add added more tests debug (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak authored Aug 4, 2019
1 parent 043c41b commit e46bea5
Show file tree
Hide file tree
Showing 6 changed files with 353 additions and 348 deletions.
2 changes: 1 addition & 1 deletion message/infrastructure/bench_pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type BenchmarkPubSubConstructor func(n int) (message.Publisher, message.Subscrib

func BenchSubscriber(b *testing.B, pubSubConstructor BenchmarkPubSubConstructor) {
pub, sub := pubSubConstructor(b.N)
topicName := testTopicName()
topicName := testTopicName(NewTestID())

messages, err := sub.Subscribe(context.Background(), topicName)
if err != nil {
Expand Down
24 changes: 24 additions & 0 deletions message/infrastructure/gochannel/pubsub_stress_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// +build stress

package gochannel_test

import (
"testing"

"github.com/ThreeDotsLabs/watermill/message/infrastructure"
)

func TestPublishSubscribe_stress(t *testing.T) {
infrastructure.TestPubSubStressTest(
t,
infrastructure.Features{
ConsumerGroups: false,
ExactlyOnceDelivery: true,
GuaranteedOrder: false,
Persistent: false,
RequireSingleInstance: true,
},
createPersistentPubSub,
nil,
)
}
2 changes: 1 addition & 1 deletion message/infrastructure/gochannel/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestPublishSubscribe_not_persistent(t *testing.T) {
msgs, err := pubSub.Subscribe(context.Background(), topicName)
require.NoError(t, err)

sendMessages := infrastructure.AddSimpleMessages(t, messagesCount, pubSub, topicName)
sendMessages := infrastructure.PublishSimpleMessages(t, messagesCount, pubSub, topicName)
receivedMsgs, _ := subscriber.BulkRead(msgs, messagesCount, time.Second)

infrastructure.AssertAllMessagesReceived(t, sendMessages, receivedMsgs)
Expand Down
204 changes: 0 additions & 204 deletions message/infrastructure/test_no_group_subscriber.go

This file was deleted.

Loading

0 comments on commit e46bea5

Please sign in to comment.