This is an automated email from the ASF dual-hosted git repository.

walleliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/eventmesh-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 2a03de8  Removed invalid code.[producer_test.go] #3775
     new 6cedded  Merge pull request #3 from piyush280599/patch-1
2a03de8 is described below

commit 2a03de85b817acd249b4cd4bb644ca4a018d991f
Author: Piyush <[email protected]>
AuthorDate: Thu Apr 20 18:28:21 2023 +0530

    Removed invalid code.[producer_test.go] #3775
---
 .../standalone/standalone_connector_test.go        | 49 +---------------------
 1 file changed, 1 insertion(+), 48 deletions(-)

diff --git a/plugin/connector/standalone/standalone_connector_test.go 
b/plugin/connector/standalone/standalone_connector_test.go
index c6f70b2..0f48a90 100644
--- a/plugin/connector/standalone/standalone_connector_test.go
+++ b/plugin/connector/standalone/standalone_connector_test.go
@@ -147,54 +147,7 @@ func TestConsumer_ManualAck(t *testing.T) {
 
 // TODO update later
 func TestConsumer_UpdateOffset(t *testing.T) {
-       //sum := atomic.NewInt64(0)
-       //ch := make(chan struct{})
-       //listener := connector.EventListener{
-       //      Consume: func(event *ce.Event, commitFunc connector.CommitFunc) 
error {
-       //              var data map[string]interface{}
-       //              event.DataAs(&data)
-       //              sum.Add(int64(data["val"].(float64)))
-       //              commitFunc(connector.CommitMessage)
-       //              ch <- struct{}{}
-       //              return nil
-       //      },
-       //}
-       //
-       //factory := &Factory{}
-       //err := factory.Setup(pluginName, &plugin.YamlNodeDecoder{
-       //      Node: &yaml.Node{},
-       //})
-       //assert.NoError(t, err)
-       //consumer, _ := factory.GetConsumer()
-       //consumer.Start()
-       //defer consumer.Shutdown()
-       //consumer.RegisterEventListener(&listener)
-       //event := getTestEvent()
-       //event.SetExtension("offset", "49")
-       //consumer.Subscribe(topicName)
-       //consumer.UpdateOffset(context.Background(), []*ce.Event{event})
-       //
-       //producer, _ := factory.GetProducer()
-       //producer.Start()
-       //defer producer.Shutdown()
-       //for i := 1; i <= 50; i++ {
-       //      err := producer.Publish(context.Background(), 
getTestEventOfData(map[string]interface{}{
-       //              "val": i,
-       //      }), getEmptyPublishCallback())
-       //
-       //      if err != nil {
-       //              t.Fail()
-       //              return
-       //      }
-       //}
-       //
-       //timer := time.NewTimer(3 * time.Second)
-       //select {
-       //case <-timer.C:
-       //      t.Fail()
-       //case <-ch:
-       //      assert.Equal(t, int64(50), sum.Load())
-       //}
+       
 }
 
 func getTestEvent(topicName string) *ce.Event {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to