@@ -188,6 +188,9 @@ func readAndParseSpanFile(path string) (SpanFileData, error) {
188
188
}
189
189
190
190
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_AutomaticSpanLifecycle () {
191
+ if ! * otelTest {
192
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
193
+ }
191
194
suite .runWithSpecificClients (ClientTypeFlag (StandaloneFlag ), func (client interfaces.BaseClientCommands ) {
192
195
// Force garbage collection
193
196
runtime .GC ()
@@ -216,6 +219,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_AutomaticSpanLifecycle()
216
219
}
217
220
218
221
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_GlobalConfigNotReinitialize () {
222
+ if ! * otelTest {
223
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
224
+ }
219
225
suite .runWithSpecificClients (ClientTypeFlag (StandaloneFlag ), func (client interfaces.BaseClientCommands ) {
220
226
// Try to initialize OpenTelemetry with wrong endpoint
221
227
wrongConfig := glide.OpenTelemetryConfig {
@@ -244,6 +250,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_GlobalConfigNotReinitiali
244
250
}
245
251
246
252
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_ConcurrentCommandsSpanLifecycle () {
253
+ if ! * otelTest {
254
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
255
+ }
247
256
suite .runWithSpecificClients (ClientTypeFlag (StandaloneFlag ), func (client interfaces.BaseClientCommands ) {
248
257
// Force garbage collection
249
258
runtime .GC ()
@@ -304,6 +313,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_ConcurrentCommandsSpanLif
304
313
305
314
// cluster tests
306
315
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_ClusterClientMemoryLeak () {
316
+ if ! * otelTest {
317
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
318
+ }
307
319
suite .runWithSpecificClients (ClientTypeFlag (ClusterFlag ), func (client interfaces.BaseClientCommands ) {
308
320
// Force garbage collection
309
321
runtime .GC ()
@@ -336,6 +348,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_ClusterClientMemoryLeak()
336
348
}
337
349
338
350
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_ClusterClientSamplingPercentage () {
351
+ if ! * otelTest {
352
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
353
+ }
339
354
suite .runWithSpecificClients (ClientTypeFlag (ClusterFlag ), func (client interfaces.BaseClientCommands ) {
340
355
// Set sampling percentage to 0
341
356
err := glide .GetInstance ().SetSamplePercentage (0 )
@@ -396,6 +411,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_ClusterClientSamplingPerc
396
411
}
397
412
398
413
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_ClusterClientGlobalConfigNotReinitialize () {
414
+ if ! * otelTest {
415
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
416
+ }
399
417
suite .runWithSpecificClients (ClientTypeFlag (ClusterFlag ), func (client interfaces.BaseClientCommands ) {
400
418
// Try to initialize OpenTelemetry with wrong endpoint
401
419
wrongConfig := glide.OpenTelemetryConfig {
@@ -424,6 +442,9 @@ func (suite *OpenTelemetryTestSuite) TestOpenTelemetry_ClusterClientGlobalConfig
424
442
}
425
443
426
444
func (suite * OpenTelemetryTestSuite ) TestOpenTelemetry_ClusterClientMultipleClients () {
445
+ if ! * otelTest {
446
+ suite .T ().Skip ("OpenTelemetry tests are disabled" )
447
+ }
427
448
suite .runWithSpecificClients (ClientTypeFlag (ClusterFlag ), func (client1 interfaces.BaseClientCommands ) {
428
449
// Create a second client with the same configuration
429
450
client2 := suite .clusterClient (suite .defaultClusterClientConfig ())
0 commit comments