Fix test failures of t/prefetch/grouped.t (BZ#1370461)

epel9
Jitka Plesnikova 9 years ago
parent 257bd0df95
commit 9fa7d3fd91

@ -0,0 +1,37 @@
From adcc1df0049e0093cb94c867bd2be8c9fe242a61 Mon Sep 17 00:00:00 2001
From: Peter Rabbitson <ribasushi@cpan.org>
Date: Tue, 13 Sep 2016 17:15:48 +0200
Subject: [PATCH] Fix for upcoming (not yet available via DBD::SQLite)
libsqlite version
---
Changes | 2 ++
t/prefetch/grouped.t | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
#diff --git a/Changes b/Changes
#index 72d7647..e402e5a 100644
#--- a/Changes
#+++ b/Changes
#@@ -73,6 +73,8 @@ Revision history for DBIx::Class
# working with copy() in t/icdt/engine_specific/sybase.t (GH#84)
# - Fix t/54taint.t failing on local::lib's with upgraded Carp on 5.8.*
# - Fix invalid variable names in ResultSource::View examples
#+ - Fix missing ORDER BY leading to failures of t/prefetch/grouped.t
#+ under upcoming libsqlite (RT#117271)
# - Skip tests in a way more intelligent and speedy manner when optional
# dependencies are missing
# - Make the Optional::Dependencies error messages cpanm-friendly
diff --git a/t/prefetch/grouped.t b/t/prefetch/grouped.t
index 4aad6b1..c0d2224 100644
--- a/t/prefetch/grouped.t
+++ b/t/prefetch/grouped.t
@@ -100,7 +100,7 @@ my @cdids = sort $cd_rs->get_column ('cdid')->all;
# add an extra track to one of the cds, and then make sure we can get it on top
# (check if limit works)
- my $top_cd = $cd_rs->slice (1,1)->next;
+ my $top_cd = $cd_rs->search({}, { order_by => 'cdid' })->slice (1,1)->next;
$top_cd->create_related ('tracks', {
title => 'over the top',
});

@ -1,11 +1,14 @@
Name: perl-DBIx-Class Name: perl-DBIx-Class
Summary: Extensible and flexible object <-> relational mapper Summary: Extensible and flexible object <-> relational mapper
Version: 0.082840 Version: 0.082840
Release: 1%{?dist} Release: 2%{?dist}
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
Source0: http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/DBIx-Class-%{version}.tar.gz Source0: http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/DBIx-Class-%{version}.tar.gz
URL: http://search.cpan.org/dist/DBIx-Class/ URL: http://search.cpan.org/dist/DBIx-Class/
# Fix missing ORDER BY leading to failures of t/prefetch/grouped.t under
# upcoming libsqlite (RT#117271)
Patch0: DBIx-Class-0.082840-Fix-test-RT117271.patch
BuildArch: noarch BuildArch: noarch
# Build # Build
BuildRequires: coreutils BuildRequires: coreutils
@ -267,6 +270,7 @@ DISTINCT, GROUP BY and HAVING support.
%prep %prep
%setup -q -n DBIx-Class-%{version} %setup -q -n DBIx-Class-%{version}
%patch0 -p1
chmod -c +x script/* chmod -c +x script/*
# skip dbic_pretty.t when bootstrapping # skip dbic_pretty.t when bootstrapping
%if 0%{?perl_bootstrap} %if 0%{?perl_bootstrap}
@ -297,6 +301,9 @@ make test
%{_mandir}/man[13]/* %{_mandir}/man[13]/*
%changelog %changelog
* Wed Sep 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.082840-2
- Fix test failures of t/prefetch/grouped.t (BZ#1370461)
* Mon Jun 20 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.082840-1 * Mon Jun 20 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.082840-1
- 0.082840 bump - 0.082840 bump

Loading…
Cancel
Save