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 flaky conn tests that use time.time #1758

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Fix flaky conn tests that use time.time #1758

merged 1 commit into from
Mar 22, 2019

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Mar 22, 2019

The time has come to fix these...

____________________________ test_connection_delay _____________________________
conn = <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>
    def test_connection_delay(conn):
        conn.last_attempt = time.time()
>       assert round(conn.connection_delay()) == round(conn.config['reconnect_backoff_ms'])
E       assert 49.0 == 50.0
E        +  where 49.0 = round(49.48000907897949)
E        +    where 49.48000907897949 = <bound method BrokerConnection.connection_delay of <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>>()
E        +      where <bound method BrokerConnection.connection_delay of <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>> = <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>.connection_delay
E        +  and   50.0 = round(50)
test/test_conn.py:84: AssertionError

This change is Reviewable

@dpkp dpkp requested a review from jeffwidman March 22, 2019 03:22
@dpkp dpkp merged commit d032844 into master Mar 22, 2019
@dpkp dpkp deleted the fix_flaky_conn_tests branch March 22, 2019 05:48
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.

1 participant