Skip to content

Conversation

@jiahuili430
Copy link
Contributor

@jiahuili430 jiahuili430 commented Dec 12, 2025

Overview

  • Elixir unit tests need to end with _test.exs to run.

    • large_docs_test.exs
    • reshard_changes_feed_test.exs
    • disk_monitor_test.exs
  • The Enum.each() method cannot run tests because it iterates through
    the data at runtime, while the test macro is defined at compile time.
    Therefore, replace it with a for loop.

    • rewrite_js_test.exs
    • rewrite_test.exs
  • Update outdated tests.

    • cluster_with_quorum_test.exs
    • cluster_without_quorum_test.exs
    • cookie_auth_test.exs
  • Update Elixir test config files.

    • config/search.elixir
    • config/skip.elixir
    • config/suite.elixir

Testing recommendations

make elixir
make elixir-search

Related Issues or Pull Requests

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

@jiahuili430 jiahuili430 force-pushed the fix-elixir-tests branch 3 times, most recently from 969dc8b to 6d84623 Compare December 12, 2025 18:47
@jiahuili430 jiahuili430 marked this pull request as ready for review December 12, 2025 18:47
@jiahuili430 jiahuili430 requested a review from janl December 12, 2025 18:53
@jiahuili430 jiahuili430 force-pushed the fix-elixir-tests branch 2 times, most recently from 42b2c15 to 54ab394 Compare December 12, 2025 21:53
@jiahuili430 jiahuili430 changed the title Update Elixir tests and config Update Elixir tests and config files Dec 12, 2025
],
"ReaderACLTest": [
"unrestricted db can be read"
"JwtRolesClaimTest": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we skip the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This test was not included in the suite.elixir, so it was never run in the CI before.
  2. If adding this to the suite.elixir file, running make elixir tests=test/elixir/test/jwt_roles_claim_test.exs will fail locally.
$ make elixir tests=test/elixir/test/jwt_roles_claim_test.exs
...
Finished in 0.1 seconds (0.00s async, 0.1s sync)
5 tests, 5 failures

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReplicationTest: they passed locally, but failed in CI.

- Elixir unit tests need to end with `_test.exs` to run.
  - large_docs_test.exs
  - reshard_changes_feed_test.exs
  - disk_monitor_test.exs
  - 04_key_test.exs
  - 25_beginswith_test.exs

- The `Enum.each()` method cannot run tests because it iterates
  through the data at runtime, while the test macro is defined at
  compile time. Therefore, replace it with a for loop.
  - rewrite_js_test.exs
  - rewrite_test.exs

- Update outdated tests.
  - cluster_with_quorum_test.exs
  - cluster_without_quorum_test.exs
  - cookie_auth_test.exs
- warning: variable "db" is unused (if the variable is not meant
  to be used, prefix it with an underscore).
  - friend_docs.ex
  - limit_docs.ex

- warning: using single-quoted strings to represent charlists is
  deprecated.
  - user_docs.ex

- warning: trailing commas are not allowed inside function/macro
  call arguments.
  - 02_basic_find_test.exs
- config/search.elixir
- config/skip.elixir
- config/suite.elixir
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