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

Fix TestHiveGlueMetastore#testGetDatabasesLogsStats #11199

Conversation

homar
Copy link
Member

@homar homar commented Feb 25, 2022

Description

Previous implementation depended on the number of databases and could lead to failure

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Feb 25, 2022
@homar homar requested a review from findepi February 25, 2022 11:42
@@ -318,7 +318,7 @@ public void testGetDatabasesLogsStats()
double initialCallCount = stats.getGetDatabases().getTime().getAllTime().getCount();
long initialFailureCount = stats.getGetDatabases().getTotalFailures().getTotalCount();
getMetastoreClient().getAllDatabases();
assertEquals(stats.getGetDatabases().getTime().getAllTime().getCount(), initialCallCount + 1.0);
assertTrue(stats.getGetDatabases().getTime().getAllTime().getCount() > initialCallCount);
Copy link
Member

Choose a reason for hiding this comment

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

don't use assertTrue with expressions
use assertThat(...).isGreaterThan

@homar homar force-pushed the homar/fix_test_hive_glue_metastore_test_get_databases_logs_stats branch from cb79511 to 979de91 Compare February 25, 2022 11:58
@findepi findepi merged commit 7eb9c57 into trinodb:master Feb 25, 2022
@github-actions github-actions bot added this to the 372 milestone Feb 25, 2022
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.

2 participants