Skip to content

Add new config param 'show_reproduce_content' #116

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

Merged
merged 2 commits into from
Sep 4, 2018

Conversation

sergw
Copy link
Contributor

@sergw sergw commented Aug 20, 2018

By default this param is True, if the test fails then the contents of
reproduce file are displayed. If the parameter is False, do not show
the contents of reproduce file. For example, the 'sql-tap' tests run
each case in a separate tarantool instance, so reproduce is not
necessary for problem investigation. Used in 'suite.ini'.

Closes #113

@sergw sergw requested a review from Totktonada August 20, 2018 08:26
@sergw sergw self-assigned this Aug 20, 2018
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

Please, consider two comments below.

@@ -214,3 +217,11 @@ def is_parallel(self):
raise ConfigurationError()
pass
return val

@property
def show_reproduce_content(self):
Copy link
Member

Choose a reason for hiding this comment

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

Please, raise an error for anything except True, False or omitted option.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, we have two boolean parse code: here and in 'is_parallel`. Sorry, I don’t write it explicitly. I think one the versions of the code should be reused.

lib/worker.py Outdated
@@ -177,7 +179,7 @@ def done_marker(self):
return WorkerDone(self.id, self.name)

def wrap_result(self, task_id, short_status):
return WorkerTaskResult(self.id, self.name, task_id, short_status)
return WorkerTaskResult(self.id, self.name, task_id, short_status, self.suite.ini)
Copy link
Member

Choose a reason for hiding this comment

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

It looks too expensive to pass full test suite configuration over the pipe per each test result. Please, extract the option from self.suite.

It is possible to omit passing the option value from worker processes to the main process at all. We need to pass the option information from task groups when creating StatisticsWatcher (see dispatcher.py:127) and use worker_name part after _ (underscore) in StatisticsWatcher.process_result to determine the test suite name and so the option value. The approach looks better for me, because it doesn't pass data already known by the main process, but I don't insist on it. It has obvious disadvantage: we lean on the worker naming schema.

@sergw sergw force-pushed the new_ini_cfg_show_reproduce_content branch 2 times, most recently from 153a238 to 91819ef Compare September 3, 2018 00:32
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

One minor comments added.

No need to re-review again with me, LGTM.

@@ -214,3 +217,11 @@ def is_parallel(self):
raise ConfigurationError()
pass
return val

@property
def show_reproduce_content(self):
Copy link
Member

Choose a reason for hiding this comment

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

I mean, we have two boolean parse code: here and in 'is_parallel`. Sorry, I don’t write it explicitly. I think one the versions of the code should be reused.

Sergei Voronezhskii added 2 commits September 4, 2018 12:02
By default this param is True, if the test fails then the contents of
reproduce file are displayed. If the parameter is False, do not show
the contents of reproduce file.  For example, the 'sql-tap' tests run
each case in a separate tarantool instance, so reproduce is not
necessary for problem investigation. Used in 'suite.ini'.

Closes #113
@sergw sergw force-pushed the new_ini_cfg_show_reproduce_content branch from 91819ef to 4a0340e Compare September 4, 2018 09:03
@sergw sergw merged commit 5dcc453 into master Sep 4, 2018
@sergw sergw deleted the new_ini_cfg_show_reproduce_content branch September 4, 2018 09:06
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.

2 participants