Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test](build index) enhance build index case for finished state #42630

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

airborne12
Copy link
Member

Proposed changes

Fix case error as below

Exception in fault_injection_p0/test_build_index_with_clone_fault.groovy(line 76):

                logger.warn("Attempt ${attempt + 1}: show_build_index is empty or null. Retrying after ${waitSeconds} second(s)...")
            }
            attempt++
            if (attempt < maxRetries) {
                sleep(waitSeconds * 1000)
            }
        }
        def finalBuildIndex = sql_return_maparray("show build index where TableName = \"${tbl}\" ORDER BY JobId DESC LIMIT 1")
        assertTrue(finalBuildIndex && finalBuildIndex.size() > 0, "show_build_index is empty or null after ${maxRetries} attempts")
        assertEquals(expectedState, finalBuildIndex[0].State, "State does not match after ${maxRetries} attempts")
^^^^^^^^^^^^^^^^^^^^^^^^^^ERROR LINE^^^^^^^^^^^^^^^^^^^^^^^^^^
        assertEquals(expectedMsg, finalBuildIndex[0].Msg, "Msg does not match after ${maxRetries} attempts")
    }

    def tbl = 'test_build_index_with_clone'
    try {
        GetDebugPoint().enableDebugPointForAllBEs("EngineCloneTask.wait_clone")
        logger.info("add debug point EngineCloneTask.wait_clone")
        sql """ DROP TABLE IF EXISTS ${tbl} """
        sql """
            CREATE TABLE ${tbl} (

Exception:
org.opentest4j.AssertionFailedError: State does not match after 3 attempts ==> expected: <WAITING_TXN> but was: <FINISHED>

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@airborne12
Copy link
Member Author

run buildall

Copy link
Contributor

@qidaye qidaye left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@csun5285 csun5285 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 28, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@airborne12 airborne12 merged commit 1cbee7a into apache:master Oct 28, 2024
28 of 30 checks passed
@airborne12 airborne12 deleted the fix-case1 branch October 28, 2024 12:35
airborne12 added a commit to airborne12/apache-doris that referenced this pull request Oct 28, 2024
…he#42630)

## Proposed changes

Fix case error as below
```
Exception in fault_injection_p0/test_build_index_with_clone_fault.groovy(line 76):

                logger.warn("Attempt ${attempt + 1}: show_build_index is empty or null. Retrying after ${waitSeconds} second(s)...")
            }
            attempt++
            if (attempt < maxRetries) {
                sleep(waitSeconds * 1000)
            }
        }
        def finalBuildIndex = sql_return_maparray("show build index where TableName = \"${tbl}\" ORDER BY JobId DESC LIMIT 1")
        assertTrue(finalBuildIndex && finalBuildIndex.size() > 0, "show_build_index is empty or null after ${maxRetries} attempts")
        assertEquals(expectedState, finalBuildIndex[0].State, "State does not match after ${maxRetries} attempts")
^^^^^^^^^^^^^^^^^^^^^^^^^^ERROR LINE^^^^^^^^^^^^^^^^^^^^^^^^^^
        assertEquals(expectedMsg, finalBuildIndex[0].Msg, "Msg does not match after ${maxRetries} attempts")
    }

    def tbl = 'test_build_index_with_clone'
    try {
        GetDebugPoint().enableDebugPointForAllBEs("EngineCloneTask.wait_clone")
        logger.info("add debug point EngineCloneTask.wait_clone")
        sql """ DROP TABLE IF EXISTS ${tbl} """
        sql """
            CREATE TABLE ${tbl} (

Exception:
org.opentest4j.AssertionFailedError: State does not match after 3 attempts ==> expected: <WAITING_TXN> but was: <FINISHED>
```
airborne12 added a commit that referenced this pull request Oct 28, 2024
airborne12 added a commit that referenced this pull request Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.7-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants