Skip to content

Commit

Permalink
fix: use pulsar for streaming it
Browse files Browse the repository at this point in the history
Signed-off-by: chyezh <[email protected]>
  • Loading branch information
chyezh committed Jan 25, 2025
1 parent 4ae22b5 commit c8502dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/integration/minicluster_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ type MiniClusterV2 struct {

type OptionV2 func(cluster *MiniClusterV2)

func OptionSetParam(k string, v string) OptionV2 {
return func(cluster *MiniClusterV2) {
cluster.params[k] = v
}
}

func StartMiniClusterV2(ctx context.Context, opts ...OptionV2) (*MiniClusterV2, error) {
cluster := &MiniClusterV2{
ctx: ctx,
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/streaming/hello_streaming_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type HelloStreamingSuite struct {

func (s *HelloStreamingSuite) SetupSuite() {
streamingutil.SetStreamingServiceEnabled()
s.MiniClusterSuite.Opt = []integration.OptionV2{
integration.OptionSetParam("mq.type", "pulsar"),
}
s.MiniClusterSuite.SetupSuite()
}

Expand Down
4 changes: 3 additions & 1 deletion tests/integration/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type MiniClusterSuite struct {
EmbedEtcdSuite

Cluster *MiniClusterV2
Opt []OptionV2
cancelFunc context.CancelFunc
}

Expand All @@ -111,10 +112,11 @@ func (s *MiniClusterSuite) SetupTest() {
s.T().Log("Setup case timeout", caseTimeout)
ctx, cancel := context.WithTimeout(context.Background(), caseTimeout)
s.cancelFunc = cancel
c, err := StartMiniClusterV2(ctx, func(c *MiniClusterV2) {
opts := append(s.Opt, func(c *MiniClusterV2) {
// change config etcd endpoints
c.params[params.EtcdCfg.Endpoints.Key] = val
})
c, err := StartMiniClusterV2(ctx, opts...)
s.Require().NoError(err)
s.Cluster = c

Expand Down

0 comments on commit c8502dd

Please sign in to comment.