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

[Bug report] the web e2e test: homepage link to catalogs page errors #2512

Closed
ch3yne opened this issue Mar 12, 2024 · 0 comments · Fixed by #2534
Closed

[Bug report] the web e2e test: homepage link to catalogs page errors #2512

ch3yne opened this issue Mar 12, 2024 · 0 comments · Fixed by #2534
Assignees
Labels
bug Something isn't working

Comments

@ch3yne
Copy link
Contributor

ch3yne commented Mar 12, 2024

Version

main branch

Describe what's wrong

On GitHub Actions, the test case for redirecting the homepage to the catalogs page shows an error saying it can't find the element. However, the test case passes when run locally.

I guess its the performance issue in the test environment caused the click operation to be performed before finding the element. Even after adding the waiting method according to the selenium documentation, it still doesn't work.

Note: https://www.selenium.dev/documentation/webdriver/waits/#customization

Error message and/or stacktrace

https://github.com/datastrato/gravitino/actions/runs/8247366502/job/22555629928

MetalakePageTest > testLinkToCatalogsPage() FAILED
    org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: //a[@href='/ui/metalakes?metalake=a_link'] (tried for 10 second(s) with 500 milliseconds interval)
        at app//org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95)
        at app//org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
        at app//com.datastrato.gravitino.integration.test.web.ui.Pages.MetalakePage.clickMetalakeLink(MetalakePage.java:129)
        at app//com.datastrato.gravitino.integration.test.web.ui.MetalakePageTest.testLinkToCatalogsPage(MetalakePageTest.java:107)

        Caused by:
        org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[@href='/ui/metalakes?metalake=a_link']"}
          (Session info: headless chrome=103.0.5046.0)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'fv-az1427-457', ip: '10.1.0.104', os.name: 'Linux', os.arch: 'amd64', os.version: '6.5.0-1015-azure', java.version: '11.0.22'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 103.0.5046.0, chrome: {chromedriverVersion: 103.0.5046.0 (06b463a305bed..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:33911}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
        Session ID: [297](https://github.com/datastrato/gravitino/actions/runs/8247366502/job/22555629928#step:7:298)206a4ea8ac699f199af1f8f590394
        *** Element info: {Using=xpath, value=//a[@href='/ui/metalakes?metalake=a_link']}
            at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
            at [email protected]/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at [email protected]/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
            at app//org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
            at app//org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
            at app//org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
            at app//org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
            at app//org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
            at app//org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
            at app//org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
            at app//org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428)
            at app//org.openqa.selenium.By$ByXPath.findElement(By.java:353)
            at app//org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
            at app//org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:205)
            at app//org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:201)
            at app//org.openqa.selenium.support.ui.ExpectedConditions$22.apply(ExpectedConditions.java:641)
            at app//org.openqa.selenium.support.ui.ExpectedConditions$22.apply(ExpectedConditions.java:638)
            at app//org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
            ... 2 more

How to reproduce

Related PR
#2395

Github Actions - Integration Test
https://github.com/datastrato/gravitino/actions/runs/8247366502/job/22555629928

Additional context

No response

@ch3yne ch3yne added the bug Something isn't working label Mar 12, 2024
@ch3yne ch3yne assigned ch3yne and unassigned ch3yne Mar 12, 2024
@xunliu xunliu closed this as completed in 5ceb2b8 Mar 21, 2024
coolderli pushed a commit to coolderli/gravitino that referenced this issue Apr 2, 2024
…running on the github actions (apache#2534)

### What changes were proposed in this pull request?

Fix web e2e test running.

Testing on GitHub actions will result in errors, but it doesn't happen
locally. It's probably due to performance issues in the testing
environment causing the frontend delay animation to take longer than
expected.

### Why are the changes needed?

Fix: apache#2532
Fix: apache#2512

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

Github Actions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant