Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/googlecloudspanner] Disable flaky test #9333

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func createMetricsMetadataFromTimestampColumn(query string, timestampColumn stri
}
}

func createCurrentStatsReaderWithCorruptedMetadata(client *spanner.Client) Reader {
func createCurrentStatsReaderWithCorruptedMetadata(client *spanner.Client) Reader { //nolint
query := "SELECT * FROM STATS"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)
Expand All @@ -76,15 +76,15 @@ func createCurrentStatsReaderWithCorruptedMetadata(client *spanner.Client) Reade
createMetricsMetadataFromTimestampColumn(query, "NOT_EXISTING"), ReaderConfig{})
}

func createCurrentStatsReader(client *spanner.Client) Reader {
func createCurrentStatsReader(client *spanner.Client) Reader { //nolint
query := "SELECT * FROM STATS"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)

return newCurrentStatsReader(zap.NewNop(), databaseFromClient, createMetricsMetadata(query), ReaderConfig{})
}

func createCurrentStatsReaderWithMaxRowsLimit(client *spanner.Client) Reader {
func createCurrentStatsReaderWithMaxRowsLimit(client *spanner.Client) Reader { //nolint
query := "SELECT * FROM STATS"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)
Expand All @@ -95,7 +95,7 @@ func createCurrentStatsReaderWithMaxRowsLimit(client *spanner.Client) Reader {
return newCurrentStatsReader(zap.NewNop(), databaseFromClient, createMetricsMetadata(query), config)
}

func createIntervalStatsReaderWithCorruptedMetadata(client *spanner.Client, backfillEnabled bool) Reader {
func createIntervalStatsReaderWithCorruptedMetadata(client *spanner.Client, backfillEnabled bool) Reader { //nolint
query := "SELECT * FROM STATS WHERE INTERVAL_END = @pullTimestamp"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)
Expand All @@ -107,7 +107,7 @@ func createIntervalStatsReaderWithCorruptedMetadata(client *spanner.Client, back
createMetricsMetadataFromTimestampColumn(query, "NOT_EXISTING"), config)
}

func createIntervalStatsReader(client *spanner.Client, backfillEnabled bool) Reader {
func createIntervalStatsReader(client *spanner.Client, backfillEnabled bool) Reader { //nolint
query := "SELECT * FROM STATS WHERE INTERVAL_END = @pullTimestamp"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)
Expand All @@ -118,7 +118,7 @@ func createIntervalStatsReader(client *spanner.Client, backfillEnabled bool) Rea
return newIntervalStatsReader(zap.NewNop(), databaseFromClient, createMetricsMetadata(query), config)
}

func createIntervalStatsReaderWithMaxRowsLimit(client *spanner.Client, backfillEnabled bool) Reader {
func createIntervalStatsReaderWithMaxRowsLimit(client *spanner.Client, backfillEnabled bool) Reader { //nolint
query := "SELECT * FROM STATS WHERE INTERVAL_END = @pullTimestamp"
databaseID := datasource.NewDatabaseID(projectID, instanceID, databaseName)
databaseFromClient := datasource.NewDatabaseFromClient(client, databaseID)
Expand All @@ -131,6 +131,7 @@ func createIntervalStatsReaderWithMaxRowsLimit(client *spanner.Client, backfillE
}

func TestStatsReaders_Read(t *testing.T) {
t.Skip("Flaky test - See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/6318")
timestamp := shiftToStartOfMinute(time.Now().UTC())
ctx := context.Background()
server, err := spannertest.NewServer(":0")
Expand Down