The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Prove::Elasticsearch::Queue::Default; - Coordinate the running of test plans across multiple forks.

VERSION

version 0.001

SUMMARY

Grabs a random selection of tests from a provided test plan, and executes them.

CONFIGURATION

Accepts a granularity option in the [Queue] section of elastest.conf controlling how many tests you want to grab at a time. If the value is not set, we default to running everything available for our configuration. You can use this to (minimize) duplicate work done when using multiple workers of the same configuration.

CONSTRUCTOR

new(%config_options)

Thin wrapper around App::Prove::Elasticsearch::Utils::process_configuration. Subclasses likely will do more with this, such as advertise their availability to a queue.

METHODS

get_jobs

Gets the runner a selection of jobs that the queue thinks appropriate to our current configuration (if possible), and that should keep it busy for a reasonable amount of time (see the granularity option).

The idea here is that clients will run get_jobs in a loop (likely using several workers) and run them until exhausted.

list_queues(%provision_options)

List the existing queues of jobs available.

queue_jobs

Stub method. Does nothing except in 'real' queue modules like Rabbit, etc.

Called in bin/testplan to add jobs to our queue at plan creation. Should return the number of jobs that failed to queue.

build_queue_name

Builds a queue_name inside a passed job specification hashref containing version and platforms information.

Here mostly in case you need to override this for your queueing solution.

AUTHOR

George S. Baugh <teodesian@cpan.org>

SOURCE

The development version is on github at http://https://github.com/teodesian/App-Prove-Elasticsearch and may be cloned from git://https://github.com/teodesian/App-Prove-Elasticsearch.git

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by George S. Baugh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.