@@ -1238,18 +1238,18 @@ func TestTemplateInsights_Golden(t *testing.T) {
1238
1238
templates ,users ,testData := prepareFixtureAndTestData (t ,tt .makeFixture ,tt .makeTestData )
1239
1239
client ,events := prepare (t ,templates ,users ,testData )
1240
1240
1241
+ // Drain two events, the first one resumes rolluper
1242
+ // operation and the second one waits for the rollup
1243
+ // to complete.
1244
+ _ ,_ = <- events ,<- events
1245
+
1241
1246
for _ ,req := range tt .requests {
1242
1247
req := req
1243
1248
t .Run (req .name ,func (t * testing.T ) {
1244
1249
t .Parallel ()
1245
1250
1246
1251
ctx := testutil .Context (t ,testutil .WaitMedium )
1247
1252
1248
- // Drain two events, the first one resumes rolluper
1249
- // operation and the second one waits for the rollup
1250
- // to complete.
1251
- _ ,_ = <- events ,<- events
1252
-
1253
1253
report ,err := client .TemplateInsights (ctx ,req .makeRequest (templates ))
1254
1254
require .NoError (t ,err ,"want no error getting template insights" )
1255
1255
@@ -2024,18 +2024,18 @@ func TestUserActivityInsights_Golden(t *testing.T) {
2024
2024
templates ,users ,testData := prepareFixtureAndTestData (t ,tt .makeFixture ,tt .makeTestData )
2025
2025
client ,events := prepare (t ,templates ,users ,testData )
2026
2026
2027
+ // Drain two events, the first one resumes rolluper
2028
+ // operation and the second one waits for the rollup
2029
+ // to complete.
2030
+ _ ,_ = <- events ,<- events
2031
+
2027
2032
for _ ,req := range tt .requests {
2028
2033
req := req
2029
2034
t .Run (req .name ,func (t * testing.T ) {
2030
2035
t .Parallel ()
2031
2036
2032
2037
ctx := testutil .Context (t ,testutil .WaitMedium )
2033
2038
2034
- // Drain two events, the first one resumes rolluper
2035
- // operation and the second one waits for the rollup
2036
- // to complete.
2037
- _ ,_ = <- events ,<- events
2038
-
2039
2039
report ,err := client .UserActivityInsights (ctx ,req .makeRequest (templates ))
2040
2040
require .NoError (t ,err ,"want no error getting template insights" )
2041
2041