Skip to content

fix: Change YAML literal scalars to folded scalars to fix integration test timeouts#2833

Merged
oscerd merged 1 commit into
apache:mainfrom
cunningt:avroerrors
May 15, 2026
Merged

fix: Change YAML literal scalars to folded scalars to fix integration test timeouts#2833
oscerd merged 1 commit into
apache:mainfrom
cunningt:avroerrors

Conversation

@cunningt
Copy link
Copy Markdown
Contributor

Summary

Fixes integration test timeouts by changing YAML literal block scalars (|) to folded scalars (>-) in test configuration files.

Problem

The rest-openapi-sink-add-pet-test was timing out after 123 seconds because the Camel JBang process failed to start when multi-line JSON strings were passed as command-line arguments using YAML's literal block scalar (|).

When YAML literal scalars are used for system properties, the newlines are preserved in the resulting command-line arguments, causing shell parsing errors that prevent the Camel integration from starting.

Solution

Changed all instances of value: | to value: >- (folded scalar with trailing newline stripped) in test files. This folds multi-line content into single-line strings, which:

  • Avoids command-line parsing issues
  • Works correctly with shell arguments
  • Preserves the JSON content while removing problematic newlines

Changes

Updated 13 test configuration files across:

  • OpenAPI tests (1 file)
  • Transformation tests (3 files)
  • Avro tests (2 files)
  • Protobuf tests (2 files)
  • AWS tests (5 files)

All changes are purely YAML formatting - the actual JSON content remains identical.

Test Results

Before

  • OpenApiIT: 1/2 passing (rest-openapi-sink-add-pet-test timing out after 123s)

After

  • OpenApiIT: 2/2 passing (add-pet test now completes in ~11s)

No Regressions

  • All previously passing tests continue to pass
  • Pre-existing test failures in AvroIT, ProtobufIT, and CommonIT remain unchanged (different root causes)

Background

YAML Scalar Comparison:

  • Literal (|): Preserves all newlines → multi-line command arguments → shell parsing fails
  • Folded (>-): Joins lines with spaces → single-line arguments → shell parsing succeeds

This is a preventive fix that also protects other tests from similar timeout issues in the future.

🤖 Generated with Claude Code

@cunningt
Copy link
Copy Markdown
Contributor Author

Comparing the test logs in CI from this PR to the state of the branch prior, it looks like this fixes 3 tests - the number of failures went from 17 to 14, and the three failures below disappeared.

Error: AwsIT.aws()[10] » TestCaseFailed Failed to verify Camel integration 'aws-eventbridge-sink-pipe' - exit code 1

Error: AwsIT.aws()[12] » TestCaseFailed Failed to verify Camel integration 'aws-kinesis-sink-pipe' - exit code 1

Error: OpenApiIT.openapi()[2] » TestCaseFailed Action timeout after 120000 milliseconds. Failed to receive message on endpoint: 'petstoreServer.inbound'

@oscerd oscerd merged commit 4c2d745 into apache:main May 15, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants