X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=vendor%2Fgithub.com%2Ftendermint%2Ftmlibs%2Fpubsub%2Fexample_test.go;fp=vendor%2Fgithub.com%2Ftendermint%2Ftmlibs%2Fpubsub%2Fexample_test.go;h=0000000000000000000000000000000000000000;hp=3eda7d32d7a6706483bac26b9675ab1b496fda43;hb=54373c1a3efe0e373ec1605840a4363e4b246c46;hpb=ee01d543fdfe1fd0a4d548965c66f7923ea7b062 diff --git a/vendor/github.com/tendermint/tmlibs/pubsub/example_test.go b/vendor/github.com/tendermint/tmlibs/pubsub/example_test.go deleted file mode 100644 index 3eda7d32..00000000 --- a/vendor/github.com/tendermint/tmlibs/pubsub/example_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package pubsub_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/tendermint/tmlibs/log" - "github.com/tendermint/tmlibs/pubsub" - "github.com/tendermint/tmlibs/pubsub/query" -) - -func TestExample(t *testing.T) { - s := pubsub.NewServer() - s.SetLogger(log.TestingLogger()) - s.Start() - defer s.Stop() - - ctx := context.Background() - ch := make(chan interface{}, 1) - err := s.Subscribe(ctx, "example-client", query.MustParse("abci.account.name='John'"), ch) - require.NoError(t, err) - err = s.PublishWithTags(ctx, "Tombstone", map[string]interface{}{"abci.account.name": "John"}) - require.NoError(t, err) - assertReceive(t, "Tombstone", ch) -}