<commit_before>use Test::Deep;
use Test::More tests => 2;
use Data::Dumper;
use aliased 'Artemis::MCP::Scheduler::Queue';
use aliased 'Artemis::MCP::Scheduler::Algorithm';
use aliased 'Artemis::MCP::Scheduler::Algorithm::Dummy';

my $scheduler = Algorithm->new_with_traits
    (
     traits => [Dummy]
    );
ok($scheduler->does(Dummy), 'does Dummy');

$scheduler->add_queue(Queue->new(name => 'A', priority => 300));
$scheduler->add_queue(Queue->new(name => 'B', priority => 200));
$scheduler->add_queue(Queue->new(name => 'C', priority => 100));

my @order;

push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();

my $right_order=['A','B','C','A','B','C'];
my @order_names = map { $_->name } @order;
is_deeply(\@order_names, $right_order, 'Scheduling');<commit_msg>Schedler: fix test for dummy algorithm<commit_after>use Test::Deep;
use Test::More tests => 2;
use Data::Dumper;
use aliased 'Artemis::MCP::Scheduler::Queue';
use aliased 'Artemis::MCP::Scheduler::Algorithm';
use aliased 'Artemis::MCP::Scheduler::Algorithm::DummyAlgorithm';

my $scheduler = Algorithm->new_with_traits
    (
     traits => [DummyAlgorithm],
     queues => {}, # set explicitely later
    );
ok($scheduler->does(DummyAlgorithm), 'does DummyAlgorithm');

$scheduler->add_queue(Queue->new(name => 'A', priority => 300));
$scheduler->add_queue(Queue->new(name => 'B', priority => 200));
$scheduler->add_queue(Queue->new(name => 'C', priority => 100));

my @order;

push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();
push @order, $scheduler->get_next_queue();

my $right_order=['A','B','C','A','B','C'];
my @order_names = map { $_->name } @order;
is_deeply(\@order_names, $right_order, 'Scheduling');
{'fraction_non_alphanumeric': 0.2061553492916463, 'fraction_numerical': 0.009770395701025891, 'mean_word_length': 7.32520325203252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7226017', 'n_tokens_mistral': 746, 'n_tokens_neox': 712, 'n_words': 142}