]> granicus.if.org Git - postgresql/commitdiff
tests: Use the right Perl operator
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 20 Jan 2017 18:03:27 +0000 (15:03 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 20 Jan 2017 18:03:35 +0000 (15:03 -0300)
We were using != to compare strings, for which "ne" is the right thing.
It's not clear why it works everywhere except on Pavan's machine, but
it's clearly bogus anyway.

Author and reporter: Pavan Deolasee
Discussion: https://postgr.es/m/CABOikdPhsHM+pX8skoEY1_T0OtKdO1udzUj4VCjU5VEt+bj4eA@mail.gmail.com

src/test/modules/commit_ts/t/004_restart.pl

index 32be07c7414c499ddb23cd56403c8bb5fc2712fd..a0a24971d2073e989a0c88f14fb0104423091ad2 100644 (file)
@@ -54,7 +54,7 @@ my $xid = $node_master->safe_psql(
 
 my $before_restart_ts = $node_master->safe_psql('postgres',
        qq[SELECT pg_xact_commit_timestamp('$xid');]);
-ok($before_restart_ts != '' && $before_restart_ts != 'null',
+ok($before_restart_ts ne '' && $before_restart_ts ne 'null',
        'commit timestamp recorded');
 
 $node_master->stop('immediate');