Skip to content

Problem: 2 implementations of fastquery exist.#2365

Merged
kansi merged 2 commits intobigchaindb:masterfrom
ldmberman:fix-fastquery
Jun 29, 2018
Merged

Problem: 2 implementations of fastquery exist.#2365
kansi merged 2 commits intobigchaindb:masterfrom
ldmberman:fix-fastquery

Conversation

@ldmberman
Copy link
Copy Markdown
Contributor

Solution: Remove the old deprecated implementation. Update the tests.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 28, 2018

Codecov Report

Merging #2365 into master will increase coverage by 0.42%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2365      +/-   ##
==========================================
+ Coverage   86.64%   87.06%   +0.42%     
==========================================
  Files          38       38              
  Lines        2126     2126              
==========================================
+ Hits         1842     1851       +9     
+ Misses        284      275       -9

assert res == gof()


@pytest.mark.tendermint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know if we need to mark them for tendermint yet. Maybe fixing them but still skipping them is better, @kansi ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does not make sense to change tests that are not executed. Also, if the tests have value, why disable them?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As far as I know, making tests 'work again' was supposed to be an extra step. I don't mind if we change them in here and make them work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I concur with @ldmberman , we have been modifying tests in other PRs which aren't enabled. That doesn't give any insight into whether the test actually passes or not. Also, I really don't mind having more tests 😄

Solution: Remove the old deprecated implementation. Update the tests.
with patch('bigchaindb.fastquery.FastQuery.get_outputs_by_public_key') as get_outputs:
from bigchaindb.tendermint.lib import BigchainDB

go = 'bigchaindb.tendermint.fastquery.FastQuery.get_outputs_by_public_key'
Copy link
Copy Markdown
Contributor

@muawiakh muawiakh Jun 29, 2018

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A short of get_outputs :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes , figured it out, thats why updated. 👍

@kansi kansi merged commit 744ab3d into bigchaindb:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants