Skip to content
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 @@ -51,7 +51,7 @@ exit_status=$?
# CloseClient
go test -v \
-run "TestExecuteQuery|TestExecuteQuery_PlanRefresh$|TestExecuteQuery_PlanRefresh_WithMetadataChange|TestExecuteQuery_PlanRefresh_Retries|TestExecuteQuery_FailsOnSuccesfulStreamWithNoToken" \
-skip "CloseClient|FailsOnEmptyMetadata|FailsOnExecuteQueryMetadata|FailsOnInvalidType|ChecksumMismatch|FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField|TestExecuteQuery_PlanRefresh_AfterResumeTokenCausesError|TestExecuteQuery_RetryTest_WithPlanRefresh|TestExecuteQuery_PlanRefresh_RespectsDeadline|TestExecuteQuery_PlanRefresh_RecoversAfterPermanentError" \
-skip "CloseClient|FailsOnEmptyMetadata|FailsOnExecuteQueryMetadata|FailsOnInvalidType|FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField|TestExecuteQuery_PlanRefresh_AfterResumeTokenCausesError|TestExecuteQuery_RetryTest_WithPlanRefresh|TestExecuteQuery_PlanRefresh_RespectsDeadline|TestExecuteQuery_PlanRefresh_RecoversAfterPermanentError" \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line is extremely long (over 250 characters), which harms readability and maintainability. Consider refactoring this long list of skipped tests into a shell array to make it easier to manage.

For example:

local -a skip_tests=(
  "CloseClient"
  "FailsOnEmptyMetadata"
  "FailsOnExecuteQueryMetadata"
  # ... and so on for each test to skip
)

local skip_arg
skip_arg="$(IFS='|'; echo "${skip_tests[*]}")"

go test -v \
  -run "..." \
  -skip "${skip_arg}" \
  ...

This approach makes the list of skipped tests much clearer and easier to modify.

-proxy_addr=:9999
exit_status=$?

Expand All @@ -65,12 +65,6 @@ exit_status=$?
# -proxy_addr=:9999
#exit_status=$?

# Stream reading tests b/461232110
#go test -v \
# -run "ChecksumMismatch" \
# -proxy_addr=:9999
#exit_status=$?

# Response/Metadata mismatches b/461233335
#go test -v \
# -run "FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField" \
Expand Down