Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

SUBMARINE-432. [SDK] test_verify_rest_response is flaky in python 3.5#230

Closed
pingsutw wants to merge 1 commit intoapache:masterfrom
pingsutw:SUBMARINE-432
Closed

SUBMARINE-432. [SDK] test_verify_rest_response is flaky in python 3.5#230
pingsutw wants to merge 1 commit intoapache:masterfrom
pingsutw:SUBMARINE-432

Conversation

@pingsutw
Copy link
Copy Markdown
Member

What is this PR for?

Fix test failure in python3.5
if we use python3.5 str({'a': 200, 'b': 2, 'c': 3}) will output different order like {'b': 2, 'c': 3, 'a': 200}
change to str(json object) will fix it.

with pytest.raises(RestException, match=str(mock_json_body)):
verify_rest_response(mock_response, '/api/v1/jobs')
E AssertionError: Pattern '{'b': 2, 'c': 3, 'a': 200}' not found in 'None: Response: {'c': 3, 'a': 200, 'b': 2}'

What type of PR is it?

[Bug Fix]

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/SUBMARINE-432

How should this be tested?

https://travis-ci.org/github/pingsutw/hadoop-submarine/builds/663060104
https://github.com/pingsutw/hadoop-submarine/runs/511082403

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

Copy link
Copy Markdown
Member

@xunliu xunliu left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in ea8e97f Mar 17, 2020
@pingsutw
Copy link
Copy Markdown
Member Author

@liuxunorg Thanks for the review and commit.

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.

2 participants