Skip to content

How to enable Debug for integ-test ES server in elastic search #102

Closed

Description

@FreCap

Running normal tests (without ES RestIntegTestTask) in intellij is very easy. We just import the project and run it it the Debug.

However I cannot find a way to run the underlying ES search server in debug mode.
I tried to add -Dcluster.debug -Dtest.debug, but it doesn't seem opening any port and the test will just run without stopping at breakpoints.

I tried to look at the code of the RestIntegTestTask gradle task (https://github.com/search?q=RestIntegTestTask&type=code), but not much insight from it.

Any advice?

Activity

  1. added
    enhancement
    on Jun 2, 2021
  2. FreCap commented on Jun 3, 2021

    @FreCap
    ContributorAuthor

    Is the only way running the tests against a separately deployed ES server?

    I tried to:

    @dai-chen do you have any quick hint that could save me?

  3. FreCap commented on Jun 3, 2021

    @FreCap
    ContributorAuthor

    For future reference, I found a way to make it work

    Adding -Dtests.jvm.argline=-agentlib:jdwp=transport=dt_socket,server=n,address=192.168.4.64:5021,suspend=y to VM options in the intellij Debug configuration

    Important, I used server=n because otherwise you need to re-attach the debugger to every ES process (keystore/plugin install, es server etc..). In this way instead you just start the debugger in LISTEN mode and it will automatically re-attach.

    image

  4. dblock commented on Jun 3, 2021

    @dblock
    Member
  5. added a commit that references this issue on Aug 16, 2022
  6. dai-chen commented on Dec 14, 2022

    @dai-chen
    Collaborator

    This PR may fixed the issue. Feel free to reopen if you still face any problem. Thanks!

  7. added
    infrastructure
    and removed
    enhancement
    on Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions