Bases: cbtestlib.tasks.future.Error
The Future was cancelled.
Bases: exceptions.Exception
Base class for all future-related exceptions.
Bases: object
Represents the result of an asynchronous computation.
Attaches a callable that will be called when the future finishes.
Cancel the future if possible.
Returns True if the future was cancelled, False otherwise. A future cannot be cancelled if it is running or has already completed.
Return True if the future has cancelled.
Return True of the future was cancelled or finished executing.
Return the exception raised by the call that the future represents.
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Return the result of the call that the future represents.
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Exception: If the call raised then that exception will be raised.
Return True if the future is currently executing.
Sets the result of the future as being the given exception.
Should only be used by Executor implementations and unit tests.
Sets the return value of work associated with the future.
Should only be used by Executor implementations and unit tests.
Mark the future as running or process any cancel notifications.
Should only be used by Executor implementations and unit tests.
If the future has been cancelled (cancel() was called and returned True) then any threads waiting on the future completing (though calls to as_completed() or wait()) are notified and False is returned.
If the future was not cancelled then it is put in the running state (future calls to running() will return True) and True is returned.
This method should be called by Executor implementations before executing the work associated with this future. If this method returns False then the work should not be executed.
Bases: cbtestlib.tasks.future.Error
The operation exceeded the given deadline.
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Task to produce the set of keys that are expected to be returned by querying the provided <view>. Results can be later passed to ViewQueryVerificationTask and compared with actual results from server.
Currently only views with map functions that emit a single string or integer as keys are accepted.
Also NOTE, this task is to be used with doc_generators that produce json like documentgenerator.DocumentGenerator
Bases: threading.Thread, cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.GenericLoadingTask
Bases: cbtestlib.tasks.task.Task
Given a config dictionary attempt to configure fragmentation settings. This task will override the default settings that are provided for a given <bucket>.
Bases: cbtestlib.tasks.task.Task
Attempt to monitor active task that is available in _active_tasks API. It allows to monitor indexer, bucket compaction.
Execute function looks at _active_tasks API and tries to identifies task for monitoring and its pid by: task type(‘indexer’ , ‘bucket_compaction’, ‘view_compaction’ ) and target value (for example “_design/ddoc” for indexing, bucket “default” for bucket compaction or “_design/dev_view” for view compaction). wait_task=True means that task should be found in the first attempt otherwise, we can assume that the task has been completed( reached 100%).
Check function monitors task by pid that was identified in execute func and matches new progress result with the previous. task is failed if:
progress is not changed during num_iterations iteration new progress was gotten less then previous
Bases: cbtestlib.tasks.task.Task
Attempt to monitor fragmentation that is occurring for a given design_doc. execute stage is just for preliminary sanity checking of values and environment.
Check function looks at index file accross all nodes and attempts to calculate total fragmentation occurring by the views within the design_doc.
Note: If autocompaction is enabled and user attempts to monitor for fragmentation value higher than level at which auto_compaction kicks in a warning is sent and it is best user to use lower value as this can lead to infinite monitoring.
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.future.Future
Bases: cbtestlib.tasks.task.GenericLoadingTask
Bases: cbtestlib.tasks.task.GenericLoadingTask
Bases: cbtestlib.tasks.task.Task
Executes view compaction for a given design doc. This is technicially view compaction as represented by the api and also because the fragmentation is generated by the keys emitted by map/reduce functions within views. Task will check that compaction history for design doc is incremented and if any work was really done.
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
Bases: cbtestlib.tasks.task.Task
query with stale=false
check for duplicates
Bases: cbtestlib.tasks.task.GenericLoadingTask