enso/test/Base_Tests
Jaroslav Tulach 3d8a0e1b90
Multi value Complex test and robustness refactoring (#11525)
While working on #11482 and enhancing the tests suite with more tests based on `type Complex` a [getRootNode() did not terminate in 100000 iterations](https://github.com/enso-org/enso/pull/11525#issuecomment-2476171597) problem was discovered. Detailed investigation revealed that the existing `ReadArgumentCheckNode` infrastructure was able to create a **cycle** of parent pointers in the Truffle AST.

The problem was in intricate manipulation of the AST while rewriting internals in `ReadArgumentCheckNode`. This PR avoids such manipulation by _refactoring the type checking code_. `ReadArgumentNode` knows nothing about types anymore. When a type check is needed, `IrToTruffle` adds additional `TypeCheckValueNode.wrap` around the `ReadArgumentNode` - that breaks the **vicious circle**.

All the _type checks_ nodes are moved to its own package. All but one of the classes are made package private. The external API for doing _type checking_ is concentrated into `TypeCheckValueNode`.
2024-11-19 17:04:42 +00:00
..
data Add Row Number starts at 0 and other tweaks. (#11017) 2024-09-09 20:26:59 +00:00
polyglot-sources/enso-test-java-helpers/src/main/java/org/enso Implement Windows-1252 fallback logic for Encoding.Default (#10190) 2024-06-10 10:49:26 +00:00
src Multi value Complex test and robustness refactoring (#11525) 2024-11-19 17:04:42 +00:00
package.yaml Atom constructors can be private (#9692) 2024-04-29 14:43:18 +02:00
README.md Pending Audit Logs are sent in batches (#10918) 2024-08-30 15:10:54 +02:00

This is a set of tests for the Base library for Enso.

HTTP tests

The run test suite for the HTTP component requires an active helper server on the localhost. If it is present, the port it listens to should be provided by setting the ENSO_HTTP_TEST_HTTPBIN_URL environment variable to a value like http://localhost:8080. The URL may contain a trailing slash.

To run the test server, you may use the following command:

sbt 'http-test-helper/run localhost 8080'

You can stop the server via Ctrl-C.

See the server's documentation for more information.

Cloud tests

By default, a subset of cloud tests runs whenever the ENSO_HTTP_TEST_HTTPBIN_URL environment variable is set, using a mock of parts of the cloud logic running on the helper server.

To run a full set of cloud tests against a real deployment, you need to set the following 3 environment variables:

  • ENSO_CLOUD_API_URI to point to the root of the cloud API,
  • ENSO_CLOUD_CREDENTIALS_FILE to be a path to a file containing the credentials to use, e.g. ~/.enso/credentials,
  • ENSO_RUN_REAL_CLOUD_TEST=1 to tell the test suite to run against a real cloud deployment.

Note that some cloud tests (e.g. testing secrets in HTTP requests) still require the ENSO_HTTP_TEST_HTTPBIN_URL setup, even if running against a real cloud deployment.

Testing audit log batching

Currently, we only have a manual scenario for testing that log messages are actually batched.

To test it, launch the http-test-helper with additional --enable-manual-log-batching-test flag. For more information, see the comment on batchingTestModeEnabled in PostLogHandler.java.