prestodb / presto-admin

A tool to install, configure and manage Presto installations

Home Page:http://prestodb.github.io/presto-admin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion of properties file content should ignore order of lines

kokosing opened this issue · comments

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
	==========================================