Skip to content

Commit 37f0b47

Browse files
committed
tests
1 parent edf5f00 commit 37f0b47

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

contrib/mmts/t/001_basic_recovery.pl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
use Cluster;
44
use TestLib;
55
use Test::More tests => 3;
6-
use DBI;
7-
use DBD::Pg ':async';
86

97
my $cluster = new Cluster(3);
108
$cluster->init();
@@ -43,11 +41,13 @@
4341
diag("stopping node 2");
4442
$cluster->{nodes}->[2]->teardown_node;
4543

46-
diag("sleeping 15");
47-
sleep(15);
44+
my $ret = $cluster->psql(0, 'postgres', "insert into t values(4, 40);");
45+
diag "tx1 status = $ret";
4846

4947
diag("inserting 2");
50-
$cluster->psql(0, 'postgres', "insert into t values(2, 20);");
48+
my $ret = $cluster->psql(0, 'postgres', "insert into t values(2, 20);");
49+
diag "tx2 status = $ret";
50+
5151
diag("selecting");
5252
$cluster->psql(1, 'postgres', "select v from t where k=2;", stdout => \$psql_out);
5353
diag("selected");
@@ -59,14 +59,18 @@
5959

6060
diag("starting node 2");
6161
$cluster->{nodes}->[2]->start;
62-
diag("sleeping 10");
62+
#diag("sleeping 10");
6363
#sleep(10); # XXX: here we can poll
64+
6465
$cluster->psql(0, 'postgres', "select mtm.poll_node(3);");
6566
diag("inserting 3");
67+
6668
$cluster->psql(0, 'postgres', "insert into t values(3, 30);");
6769
diag("selecting");
70+
6871
$cluster->psql(2, 'postgres', "select v from t where k=3;", stdout => \$psql_out);
6972
diag("selected");
73+
7074
is($psql_out, '30', "Check replication after failed node recovery.");
7175

7276

contrib/mmts/testeaux/Cluster.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ sub configure
109109
multimaster.queue_size = 10485760 # 10mb
110110
multimaster.node_id = $id
111111
multimaster.conn_strings = '$connstr'
112-
multimaster.use_raftable = true
112+
multimaster.use_raftable = false
113113
multimaster.ignore_tables_without_pk = true
114-
multimaster.twopc_min_timeout = 60000
114+
multimaster.twopc_min_timeout = 10000
115115
raftable.id = $id
116116
raftable.peers = '$raftpeers'
117117
));

contrib/raftable/raft/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#override CC := clang
22
override CFLAGS += -fpic -Wall -Wfatal-errors -O0 -g -pedantic -std=c99
3-
override CPPFLAGS += -I. -Iinclude -DDEBUG
3+
override CPPFLAGS += -I. -Iinclude #-DDEBUG
44
override HEART_LDFLAGS += -Llib -lraft -ljansson
55

66
AR = ar

src/bin/pgbench/pgbench.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,9 @@ doCustom(TState *thread, CState *st, StatsData *agg)
14641464
default:
14651465
fprintf(stderr, "client %d aborted in state %d: %s",
14661466
st->id, st->state, PQerrorMessage(st->con));
1467-
PQclear(res);
1468-
return clientDone(st, false);
1467+
//PQclear(res);
1468+
//return clientDone(st, false);
1469+
break;
14691470
}
14701471
PQclear(res);
14711472
discard_response(st);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy