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

Assertion of properties file content should ignore order of lines #324

Open
kokosing opened this issue Mar 3, 2017 · 0 comments
Open

Assertion of properties file content should ignore order of lines #324

kokosing opened this issue Mar 3, 2017 · 0 comments

Comments

@kokosing
Copy link
Contributor

kokosing commented Mar 3, 2017

In my opinion, when testing if given properties are defined in properties file should ignore the order in which properties are defined.

The best would be to compare properties which were read from given file, not exact file content.

Anyway, below (intermittent) test failure should not happen (should be fixed).

======================================================================
FAIL: test_configuration_deploy_using_dash_x_coord_worker (tests.product.test_configuration.TestConfiguration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/prestodb/presto-admin/tests/product/test_configuration.py", line 171, in test_configuration_deploy_using_dash_x_coord_worker
    self.deploy_and_assert_default_config()
  File "/home/travis/build/prestodb/presto-admin/tests/product/test_configuration.py", line 47, in deploy_and_assert_default_config
    self.assert_has_default_config(host)
  File "/home/travis/build/prestodb/presto-admin/tests/product/base_product_case.py", line 387, in assert_has_default_config
    self.default_workers_test_config_)
  File "/home/travis/build/prestodb/presto-admin/tests/product/base_product_case.py", line 327, in assert_file_content
    expected)
  File "/home/travis/build/prestodb/presto-admin/tests/base_test_case.py", line 131, in assertLazyMessage
    self.fail(msg=msg_func())
AssertionError: 	===== vv ACTUAL FILE CONTENT vv =====
	=========== DID NOT EQUAL ===========
coordinator=false
discovery.uri=http://master:28384
http-server.http.port=28384
query.max-memory-per-node=512MB
query.max-memory=50GB
	==== ^^ EXPECTED FILE CONTENT ^^ ====
	==== Content for presto-admin file ~/.prestoadmin/workers/config.properties ====
http-server.http.port=28384
query.max-memory=50GB
query.max-memory-per-node=512MB
discovery.uri=http://master:28384
coordinator=false
	==========================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant