Skip to content

Commit b11d97b

Browse files
committed
Use different notification channel names in pdo_pgsql tests
1 parent 298d60e commit b11d97b

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

ext/pdo_pgsql/tests/bug68199.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ var_dump($pid > 0);
2929
var_dump($db->pgsqlGetNotify());
3030

3131
// Listen started, no notifies
32-
$db->exec("LISTEN notifies_phpt");
32+
$db->exec("LISTEN channel_bug68199");
3333
var_dump($db->pgsqlGetNotify());
3434

3535
// No parameters with payload, use default PDO::FETCH_NUM
3636
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_NUM);
37-
$db->exec("NOTIFY notifies_phpt, 'payload'");
37+
$db->exec("NOTIFY channel_bug68199, 'payload'");
3838
$notify = $db->pgsqlGetNotify();
3939
var_dump(count($notify));
4040
var_dump($notify[0]);
@@ -43,31 +43,31 @@ var_dump($notify[2]);
4343

4444
// No parameters with payload, use default PDO::FETCH_ASSOC
4545
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
46-
$db->exec("NOTIFY notifies_phpt, 'payload'");
46+
$db->exec("NOTIFY channel_bug68199, 'payload'");
4747
$notify = $db->pgsqlGetNotify();
4848
var_dump(count($notify));
4949
var_dump($notify['message']);
5050
var_dump($notify['pid'] == $pid);
5151
var_dump($notify['payload']);
5252

5353
// Test PDO::FETCH_NUM as parameter with payload
54-
$db->exec("NOTIFY notifies_phpt, 'payload'");
54+
$db->exec("NOTIFY channel_bug68199, 'payload'");
5555
$notify = $db->pgsqlGetNotify(PDO::FETCH_NUM);
5656
var_dump(count($notify));
5757
var_dump($notify[0]);
5858
var_dump($notify[1] == $pid);
5959
var_dump($notify[2]);
6060

6161
// Test PDO::FETCH_ASSOC as parameter with payload
62-
$db->exec("NOTIFY notifies_phpt, 'payload'");
62+
$db->exec("NOTIFY channel_bug68199, 'payload'");
6363
$notify = $db->pgsqlGetNotify(PDO::FETCH_ASSOC);
6464
var_dump(count($notify));
6565
var_dump($notify['message']);
6666
var_dump($notify['pid'] == $pid);
6767
var_dump($notify['payload']);
6868

6969
// Test PDO::FETCH_BOTH as parameter with payload
70-
$db->exec("NOTIFY notifies_phpt, 'payload'");
70+
$db->exec("NOTIFY channel_bug68199, 'payload'");
7171
$notify = $db->pgsqlGetNotify(PDO::FETCH_BOTH);
7272
var_dump(count($notify));
7373
var_dump($notify['message']);
@@ -86,26 +86,26 @@ bool(true)
8686
bool(false)
8787
bool(false)
8888
int(3)
89-
string(13) "notifies_phpt"
89+
string(13) "channel_bug68199"
9090
bool(true)
9191
string(7) "payload"
9292
int(3)
93-
string(13) "notifies_phpt"
93+
string(13) "channel_bug68199"
9494
bool(true)
9595
string(7) "payload"
9696
int(3)
97-
string(13) "notifies_phpt"
97+
string(13) "channel_bug68199"
9898
bool(true)
9999
string(7) "payload"
100100
int(3)
101-
string(13) "notifies_phpt"
101+
string(13) "channel_bug68199"
102102
bool(true)
103103
string(7) "payload"
104104
int(6)
105-
string(13) "notifies_phpt"
105+
string(13) "channel_bug68199"
106106
bool(true)
107107
string(7) "payload"
108-
string(13) "notifies_phpt"
108+
string(13) "channel_bug68199"
109109
bool(true)
110110
string(7) "payload"
111111
bool(false)

ext/pdo_pgsql/tests/getnotify.phpt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,41 @@ var_dump($pid > 0);
2323
var_dump($db->pgsqlGetNotify());
2424

2525
// Listen started, no notifies
26-
$db->exec("LISTEN notifies_phpt");
26+
$db->exec("LISTEN channel_getnotify");
2727
var_dump($db->pgsqlGetNotify());
2828

2929
// No parameters, use default PDO::FETCH_NUM
3030
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_NUM);
31-
$db->exec("NOTIFY notifies_phpt");
31+
$db->exec("NOTIFY channel_getnotify");
3232
$notify = $db->pgsqlGetNotify();
3333
var_dump(count($notify));
3434
var_dump($notify[0]);
3535
var_dump($notify[1] == $pid);
3636

3737
// No parameters, use default PDO::FETCH_ASSOC
3838
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
39-
$db->exec("NOTIFY notifies_phpt");
39+
$db->exec("NOTIFY channel_getnotify");
4040
$notify = $db->pgsqlGetNotify();
4141
var_dump(count($notify));
4242
var_dump($notify['message']);
4343
var_dump($notify['pid'] == $pid);
4444

4545
// Test PDO::FETCH_NUM as parameter
46-
$db->exec("NOTIFY notifies_phpt");
46+
$db->exec("NOTIFY channel_getnotify");
4747
$notify = $db->pgsqlGetNotify(PDO::FETCH_NUM);
4848
var_dump(count($notify));
4949
var_dump($notify[0]);
5050
var_dump($notify[1] == $pid);
5151

5252
// Test PDO::FETCH_ASSOC as parameter
53-
$db->exec("NOTIFY notifies_phpt");
53+
$db->exec("NOTIFY channel_getnotify");
5454
$notify = $db->pgsqlGetNotify(PDO::FETCH_ASSOC);
5555
var_dump(count($notify));
5656
var_dump($notify['message']);
5757
var_dump($notify['pid'] == $pid);
5858

5959
// Test PDO::FETCH_BOTH as parameter
60-
$db->exec("NOTIFY notifies_phpt");
60+
$db->exec("NOTIFY channel_getnotify");
6161
$notify = $db->pgsqlGetNotify(PDO::FETCH_BOTH);
6262
var_dump(count($notify));
6363
var_dump($notify['message']);
@@ -77,7 +77,7 @@ var_dump($diff >= 1 || 1 - abs($diff) < .05);
7777
var_dump($notify);
7878

7979
// Test second parameter, should return immediately because a notify is queued
80-
$db->exec("NOTIFY notifies_phpt");
80+
$db->exec("NOTIFY channel_getnotify");
8181
$t = microtime(1);
8282
$notify = $db->pgsqlGetNotify(PDO::FETCH_ASSOC, 5000);
8383
$diff = microtime(1) - $t;
@@ -90,21 +90,21 @@ bool(true)
9090
bool(false)
9191
bool(false)
9292
int(2)
93-
string(13) "notifies_phpt"
93+
string(13) "channel_getnotify"
9494
bool(true)
9595
int(2)
96-
string(13) "notifies_phpt"
96+
string(13) "channel_getnotify"
9797
bool(true)
9898
int(2)
99-
string(13) "notifies_phpt"
99+
string(13) "channel_getnotify"
100100
bool(true)
101101
int(2)
102-
string(13) "notifies_phpt"
102+
string(13) "channel_getnotify"
103103
bool(true)
104104
int(4)
105-
string(13) "notifies_phpt"
105+
string(13) "channel_getnotify"
106106
bool(true)
107-
string(13) "notifies_phpt"
107+
string(13) "channel_getnotify"
108108
bool(true)
109109
bool(false)
110110
bool(true)

0 commit comments

Comments
 (0)