Skip to content

Remove unnecessary product tests#19822

Closed
martint wants to merge 2 commits intotrinodb:masterfrom
martint:product-tests
Closed

Remove unnecessary product tests#19822
martint wants to merge 2 commits intotrinodb:masterfrom
martint:product-tests

Conversation

@martint
Copy link
Copy Markdown
Member

@martint martint commented Nov 19, 2023

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

Copy link
Copy Markdown
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

"Move Teradata function tests to unit tests"

@Test(groups = FUNCTIONS)
public void testIndex()
{
assertThat(onTrino().executeQuery("SELECT index('high', 'ig')")).contains(row(2));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The advantage of this over a unit test was

  • ensuring the td functions are part of the production bundle.
    • for plugins, we manage to violate this many times over, so it's a lesson learned
  • ensuring the td functions work without trino-main on the classpath
    • for functions, we managed to make them work in unit tests only. I remember a case where one of the maintainers fixed plugin-provided aggregate functions 3 times, because we lacked product test coverage

I think we should keep at least one product tests' test case

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What setups do these tests run with? Are they executed with all the combinations of connectors and environments?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i hope not! Once should be enough (and i guess this was the case)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

based on the past experience i think we should have at least one test case showing that plugin-provided functions work when loaded in a real server, with real plugin classloader
#14486 (#14488)
#10341 (#10346, #10408)

Copy link
Copy Markdown
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

"Remove unnecessary product tests" LGTM

@Test(groups = {COMPARISON, QUERY_ENGINE}, dataProvider = "operands")
public void testLessThanOrEqualOperatorExists(String leftOperand, String rightOperand, String typeName)
{
assertThat(onTrino().executeQuery(format("select cast(%s as %s) <= cast(%s as %s)", leftOperand, typeName, rightOperand, typeName)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We definitely should retain some smoke test coverage of the engine as part of the product tests, to ensure Trino works in its final classpath/classloaders composition.

I don't believe such a detailed test like this was really meant for that, so I am fine with the removal.
It would be good to known what are the tests we want to retain. Maybe we don't have them yet?

@github-actions
Copy link
Copy Markdown

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jan 10, 2024
@mosabua
Copy link
Copy Markdown
Member

mosabua commented Jan 11, 2024

Consider this a reminder @martint ... I assume you will merge this after the 436 release.

@Test(groups = FUNCTIONS)
public void testIndex()
{
assertThat(onTrino().executeQuery("SELECT index('high', 'ig')")).contains(row(2));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

based on the past experience i think we should have at least one test case showing that plugin-provided functions work when loaded in a real server, with real plugin classloader
#14486 (#14488)
#10341 (#10346, #10408)

@findepi findepi dismissed their stale review January 12, 2024 12:34

(in case i don't have time to re-review)

@github-actions github-actions bot removed the stale label Jan 12, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2024

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Feb 2, 2024
@mosabua
Copy link
Copy Markdown
Member

mosabua commented Feb 2, 2024

I assume this is still valid and you will proceed with @martint

@github-actions github-actions bot removed the stale label Feb 5, 2024
@github-actions
Copy link
Copy Markdown

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Feb 28, 2024
@github-actions
Copy link
Copy Markdown

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants