Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Conversation

@joseph-sentry
Copy link
Contributor

No description provided.

@joseph-sentry joseph-sentry requested a review from a team as a code owner October 21, 2024 16:55
assert res == rows[-1:]


def test_search_base_query_with_missing_cursor_low_name_high_failure_rate_desc():
Copy link
Contributor

Choose a reason for hiding this comment

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

ngl I have no idea what this test name is telling me LOL

cursor_value_str = cursor.ordered_value
return (row_value_str > cursor_value_str) - (row_value_str < cursor_value_str)
if descending:
return (row_value_str < cursor_value_str) - (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way we can find a name for row_value_str < cursor_value_str and row_value_str > cursor_value_str such that we can have something like

varOne - varTwo if descending else varTwo - varOne

It took me a sec to realize that the terms in each equation were the same, just flipped

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (4546df1) to head (6009eff).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #907      +/-   ##
==========================================
- Coverage   96.25%   96.24%   -0.01%     
==========================================
  Files         823      823              
  Lines       19049    19054       +5     
==========================================
+ Hits        18335    18339       +4     
- Misses        714      715       +1     
Flag Coverage Δ
unit 92.52% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 92.52% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-qa
Copy link

codecov-qa bot commented Oct 21, 2024

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2707 2 2705 6
View the top 2 failed tests by shortest run time
graphql_api.tests.test_test_analytics.TestAnalyticsTestCase test_flags_no_term
Stack Traces | 0.401s run time
self = &lt;graphql_api.tests.test_test_analytics.TestAnalyticsTestCase testMethod=test_flags_no_term&gt;

    def test_flags_no_term(self) -&gt; None:
        repo = RepositoryFactory(author=self.owner, active=True, private=True)
        test = TestFactory(repository=repo)
        test2 = TestFactory(repository=repo)
    
        repo_flag = RepositoryFlagFactory(repository=repo, flag_name="hello_world")
        repo_flag2 = RepositoryFlagFactory(repository=repo, flag_name="goodbye_world")
    
        _ = TestFlagBridgeFactory(flag=repo_flag, test=test)
        _ = TestFlagBridgeFactory(flag=repo_flag2, test=test2)
    
        res = self.fetch_test_analytics(
            repo.name,
            """flags(term: "hello")""",
        )
&gt;       assert sorted(res["flags"]) == ["goodbye_world", "hello_world"]
E       AssertionError: assert ['hello_world'] == ['goodbye_wor...'hello_world']
E         
E         At index 0 diff: 'hello_world' != 'goodbye_world'
E         Right contains one more item: 'hello_world'
E         Use -v to get more diff

graphql_api/tests/test_test_analytics.py:1177: AssertionError
graphql_api.tests.test_test_analytics.TestAnalyticsTestCase test_test_suites_no_term
Stack Traces | 0.413s run time
self = &lt;graphql_api.tests.test_test_analytics.TestAnalyticsTestCase testMethod=test_test_suites_no_term&gt;

    def test_test_suites_no_term(self) -&gt; None:
        repo = RepositoryFactory(author=self.owner, active=True, private=True)
        test = TestFactory(repository=repo, testsuite="hello_world")
        test2 = TestFactory(repository=repo, testsuite="goodbye_world")
    
        repo_flag = RepositoryFlagFactory(repository=repo, flag_name="hello_world")
    
        _ = TestFlagBridgeFactory(flag=repo_flag, test=test)
        _ = DailyTestRollupFactory(
            test=test,
            created_at=datetime.datetime.now(),
            repoid=repo.repoid,
            branch="main",
            avg_duration_seconds=0.1,
        )
        _ = DailyTestRollupFactory(
            test=test2,
            created_at=datetime.datetime.now(),
            repoid=repo.repoid,
            branch="main",
            avg_duration_seconds=20.0,
        )
        res = self.fetch_test_analytics(
            repo.name,
            """testSuites(term: "hello")""",
        )
&gt;       assert sorted(res["testSuites"]) == ["goodbye_world", "hello_world"]
E       AssertionError: assert ['hello_world'] == ['goodbye_wor...'hello_world']
E         
E         At index 0 diff: 'hello_world' != 'goodbye_world'
E         Right contains one more item: 'hello_world'
E         Use -v to get more diff

graphql_api/tests/test_test_analytics.py:1143: AssertionError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@codecov-public-qa
Copy link

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2713 tests with 2 failed, 2705 passed and 6 skipped.

View the full list of failed tests

pytest

  • Class name: graphql_api.tests.test_test_analytics.TestAnalyticsTestCase
    Test name: test_flags_no_term

    self = <graphql_api.tests.test_test_analytics.TestAnalyticsTestCase testMethod=test_flags_no_term>

    def test_flags_no_term(self) -> None:
    repo = RepositoryFactory(author=self.owner, active=True, private=True)
    test = TestFactory(repository=repo)
    test2 = TestFactory(repository=repo)

    repo_flag = RepositoryFlagFactory(repository=repo, flag_name="hello_world")
    repo_flag2 = RepositoryFlagFactory(repository=repo, flag_name="goodbye_world")

    _ = TestFlagBridgeFactory(flag=repo_flag, test=test)
    _ = TestFlagBridgeFactory(flag=repo_flag2, test=test2)

    res = self.fetch_test_analytics(
    repo.name,
    """flags(term: "hello")""",
    )
    > assert sorted(res["flags"]) == ["goodbye_world", "hello_world"]
    E AssertionError: assert ['hello_world'] == ['goodbye_wor...'hello_world']
    E
    E At index 0 diff: 'hello_world' != 'goodbye_world'
    E Right contains one more item: 'hello_world'
    E Use -v to get more diff

    graphql_api/tests/test_test_analytics.py:1177: AssertionError
  • Class name: graphql_api.tests.test_test_analytics.TestAnalyticsTestCase
    Test name: test_test_suites_no_term

    self = <graphql_api.tests.test_test_analytics.TestAnalyticsTestCase testMethod=test_test_suites_no_term>

    def test_test_suites_no_term(self) -> None:
    repo = RepositoryFactory(author=self.owner, active=True, private=True)
    test = TestFactory(repository=repo, testsuite="hello_world")
    test2 = TestFactory(repository=repo, testsuite="goodbye_world")

    repo_flag = RepositoryFlagFactory(repository=repo, flag_name="hello_world")

    _ = TestFlagBridgeFactory(flag=repo_flag, test=test)
    _ = DailyTestRollupFactory(
    test=test,
    created_at=datetime.datetime.now(),
    repoid=repo.repoid,
    branch="main",
    avg_duration_seconds=0.1,
    )
    _ = DailyTestRollupFactory(
    test=test2,
    created_at=datetime.datetime.now(),
    repoid=repo.repoid,
    branch="main",
    avg_duration_seconds=20.0,
    )
    res = self.fetch_test_analytics(
    repo.name,
    """testSuites(term: "hello")""",
    )
    > assert sorted(res["testSuites"]) == ["goodbye_world", "hello_world"]
    E AssertionError: assert ['hello_world'] == ['goodbye_wor...'hello_world']
    E
    E At index 0 diff: 'hello_world' != 'goodbye_world'
    E Right contains one more item: 'hello_world'
    E Use -v to get more diff

    graphql_api/tests/test_test_analytics.py:1143: AssertionError

@joseph-sentry joseph-sentry added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 3052b2a Oct 21, 2024
18 of 19 checks passed
@joseph-sentry joseph-sentry deleted the joseph/add-testsuites-flags branch October 21, 2024 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants