How do I set ENGINE_PROTOBUF_DESER_RECURSION_LIMIT during migration test?

We have an migration integration test which is failing because of

[ERROR] check migration from 141_0 to 142_0  Time elapsed: 12.899 s  <<< ERROR!
com.noumenadigital.platform.engine.values.ClientException$PlatformRuntimeException: Runtime error: 'com.google.protobuf.InvalidProtocolBufferException: Protocol message had too many levels of nesting.  May be malicious.  Use setRecursionLimit() to increase the recursion depth limit.'

whilst constructing the data to used in validating the migration from the old version to the new version has worked.

There is an environment variable ENGINE_PROTOBUF_DESER_RECURSION_LIMIT, which can be set to fix this. This is straightforward when running the docker image, but what about when running the migration runner from a test? At which point is the variable picked up?

The upshift integration tests are run using maven verify and the failsafe plugin. The easiest way to pass ENGINE_PROTOBUF_DESER_RECURSION_LIMIT (or any other environment variable) is

ENGINE_PROTOBUF_DESER_RECURSION_LIMIT=200 mvn clean verify -pl upshift-integration-tests

Sandy,

If I remember your test setup correctly, the tests use a docker to run. You would need to set up that variable in the environment for the docker container that execute your tests.

No, the upshift migration tests do not run against an engine, they run in the context of the failsafe plugin as integration tests. The engine used by the test is for creating and check the test data.