Skip to content

Commit

Permalink
fixup! Conditionally skip Oracle tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willmostly authored and mosabua committed Feb 5, 2025
1 parent a8da606 commit e308c93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ compilation and testing are specified in `.mvn/jvm.config`.
Edit the configuration file `gateway-ha-config.yml` in the `gateway-ha` folder
and update the mysql db information.

Note that tests using Oracle are disabled by default on non-x86_64 CPU architectures.
To enable them, set the environment variable `TG_RUN_ORACLE_TESTS=true`. These tests
will always be run in GitHub CI.

```shell
cd gateway-ha/target/
java -jar gateway-ha-{{VERSION}}-jar-with-dependencies.jar ../gateway-ha-config.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ public static void setUpBackend(

public static OracleContainer getOracleContainer()
{
// reference for GITHUB_ACTIONS: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
// gvenzl/oracle-xe:18.4.0-slim is x86 only, and tests using this image will most likely timeout if
// run on other CPU architectures. This test should run in three circumstances:
// * in CI, defined by the presence of GitHub environment variables
// * if the CPU architecture is x86_64
// * if they are explicitly enabled by setting TG_RUN_ORACLE_TESTS=true in the test environment
// reference: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
assumeTrue("true".equals(System.getenv("GITHUB_ACTIONS"))
|| "x86_64".equalsIgnoreCase(System.getProperty("os.arch"))
|| "true".equals(System.getenv("TG_RUN_ORACLE_TESTS")));
Expand Down

0 comments on commit e308c93

Please sign in to comment.