Skip to content

MockBackendUtils.startMockBackend always returns true in native mode #6339

@jamesnetherton

Description

@jamesnetherton

Bug description

If you do:

export CAMEL_QUARKUS_START_MOCK_BACKEND=false

Then run any native tests (E.g azure-storage-blob & google-storage) where MockBackendUtils.startMockBackend is used at runtime (I.e. in non-test code), you'll find the results aren't as you expect. It's because the result of startMockBackend returns true, regardless of what is set in the environment.

IIRC, a recent(ish) change in Quarkus meant that build time environment variables would not propagate into the native image (since it's a potential security risk).

We should probably avoid this static lookup and just get the config value on each request. The overhead is trivial.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions