Bug 35044: (QA follow-up): Fix flaky tests
To test, run the following test file a couple times until it fails: prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t My testing this failed around 50% of the time so it should not take long to reproduce. I believe this is because the order of the array elements may differ. Apply this patch and run the test file again many times. It should never fail. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
2d5a7d19a3
commit
b5ed6e5062
|
|
@ -104,7 +104,8 @@ sub prepare_cgi_additional_field_values {
|
|||
my ( $self, $cgi, $tablename ) = @_;
|
||||
|
||||
my @additional_fields;
|
||||
my $table_fields = Koha::AdditionalFields->search( { tablename => $tablename } );
|
||||
my $table_fields =
|
||||
Koha::AdditionalFields->search( { tablename => $tablename }, { order_by => { -asc => 'id' } } );
|
||||
|
||||
while ( my $field = $table_fields->next ) {
|
||||
my @field_values = $cgi->multi_param( 'additional_field_' . $field->id );
|
||||
|
|
|
|||
Loading…
Reference in New Issue