Skip to content

Commit 2c503c5

Browse files
committed
Fix regression: use integration.New() to allow platform factory registration before Generate()
Signed-off-by: AkramBitar <akram@il.ibm.com>
1 parent bb70af5 commit 2c503c5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

integration/token/test_utils.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ func replicaName(name string, idx int) string {
110110
func NewTestSuite(startPort func() int, topologies []api.Topology) *TestSuite {
111111
return &TestSuite{
112112
generator: func() (*integration.Infrastructure, error) {
113-
return integration.Generate(startPort(), integration.WithRaceDetection, topologies...)
113+
i, err := integration.New(startPort(), "", topologies...)
114+
if err != nil {
115+
return nil, err
116+
}
117+
i.EnableRaceDetector()
118+
return i, nil
114119
},
115120
}
116121
}
@@ -120,7 +125,13 @@ func NewTestSuite(startPort func() int, topologies []api.Topology) *TestSuite {
120125
func NewLocalTestSuite(startPort func() int, topologies []api.Topology) *TestSuite {
121126
return &TestSuite{
122127
generator: func() (*integration.Infrastructure, error) {
123-
return integration.GenerateAt(startPort(), "./testdata", integration.WithRaceDetection, topologies...)
128+
i, err := integration.New(startPort(), "./testdata", topologies...)
129+
if err != nil {
130+
return nil, err
131+
}
132+
i.EnableRaceDetector()
133+
i.DeleteOnStop = false
134+
return i, nil
124135
},
125136
}
126137
}

0 commit comments

Comments
 (0)