Skip to content

Commit fc98c4c

Browse files
committed
reverted some of the code and fixed RESQL test failure issue
1 parent 028672b commit fc98c4c

File tree

5 files changed

+4
-111
lines changed

5 files changed

+4
-111
lines changed

web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,6 @@ def create(self, gid, sid, did):
483483
data=data, dummy=False, conn=self.conn)
484484
status, res = self.conn.execute_dict(sql)
485485
if not status:
486-
print("Returning from def "
487-
"create line 486")
488-
print(res)
489486
return internal_server_error(errormsg=res)
490487

491488
sql = render_template(
@@ -495,9 +492,6 @@ def create(self, gid, sid, did):
495492

496493
status, r_set = self.conn.execute_dict(sql)
497494
if not status:
498-
print(
499-
"Returning from def create line 498")
500-
print(r_set)
501495
return internal_server_error(errormsg=r_set)
502496

503497
return jsonify(
@@ -510,9 +504,6 @@ def create(self, gid, sid, did):
510504
)
511505

512506
except Exception as e:
513-
print(
514-
"Returning from def create exception line 513")
515-
print(str(e))
516507
return internal_server_error(errormsg=str(e))
517508

518509
@check_precondition
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
CREATE SUBSCRIPTION test_create_subscription
22
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer'
33
PUBLICATION test_publication
4-
WITH (connect = true, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);
4+
WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/17_plus/test.json

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,5 @@
11
{
22
"scenarios": [
3-
{
4-
"type": "create",
5-
"name": "Create Table For Subscription",
6-
"endpoint": "NODE-table.obj",
7-
"sql_endpoint": "NODE-table.sql_id",
8-
"data": {
9-
"name": "test_table",
10-
"columns": [
11-
{
12-
"name": "emp_id",
13-
"cltype": "integer",
14-
"is_primary_key": true
15-
},
16-
{
17-
"name": "name",
18-
"cltype": "text"
19-
},
20-
{
21-
"name": "salary",
22-
"cltype": "bigint"
23-
}
24-
],
25-
"is_partitioned": false,
26-
"schema": "public",
27-
"spcname": "pg_default"
28-
},
29-
"store_object_id": true
30-
},
31-
{
32-
"type": "create",
33-
"name": "Create Publication For Subscription",
34-
"endpoint": "NODE-publication.obj",
35-
"sql_endpoint": "NODE-publication.sql_id",
36-
"data": {
37-
"name": "test_publication",
38-
"evnt_insert": true,
39-
"evnt_update": true,
40-
"evnt_delete": true,
41-
"evnt_truncate": true,
42-
"pubowner": "postgres",
43-
"publish_via_partition_root": false,
44-
"all_table": false,
45-
"only_table": false,
46-
"pubtable": [{
47-
"table_name": "public.test_table"
48-
}],
49-
"pubschema": ""
50-
}
51-
},
523
{
534
"type": "create",
545
"name": "Create Subscription",
@@ -69,7 +20,7 @@
6920
"copy_data": false,
7021
"create_slot": false,
7122
"enabled": false,
72-
"connect": true,
23+
"connect": false,
7324
"slot_name": "test_create_subscription",
7425
"sync": "remote_apply",
7526
"streaming": true,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
CREATE SUBSCRIPTION test_create_subscription
22
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer'
33
PUBLICATION test_publication
4-
WITH (connect = true, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);
4+
WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/18_plus/test.json

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,5 @@
11
{
22
"scenarios": [
3-
{
4-
"type": "create",
5-
"name": "Create Table For Subscription",
6-
"endpoint": "NODE-table.obj",
7-
"sql_endpoint": "NODE-table.sql_id",
8-
"data": {
9-
"name": "test_table",
10-
"columns": [
11-
{
12-
"name": "emp_id",
13-
"cltype": "integer",
14-
"is_primary_key": true
15-
},
16-
{
17-
"name": "name",
18-
"cltype": "text"
19-
},
20-
{
21-
"name": "salary",
22-
"cltype": "bigint"
23-
}
24-
],
25-
"is_partitioned": false,
26-
"schema": "public",
27-
"spcname": "pg_default"
28-
},
29-
"store_object_id": true
30-
},
31-
{
32-
"type": "create",
33-
"name": "Create Publication For Subscription",
34-
"endpoint": "NODE-publication.obj",
35-
"sql_endpoint": "NODE-publication.sql_id",
36-
"data": {
37-
"name": "test_publication",
38-
"evnt_insert": true,
39-
"evnt_update": true,
40-
"evnt_delete": true,
41-
"evnt_truncate": true,
42-
"pubowner": "postgres",
43-
"publish_via_partition_root": false,
44-
"all_table": false,
45-
"only_table": false,
46-
"pubtable": [{
47-
"table_name": "public.test_table"
48-
}],
49-
"pubschema": ""
50-
}
51-
},
523
{
534
"type": "create",
545
"name": "Create Subscription",
@@ -69,7 +20,7 @@
6920
"copy_data": false,
7021
"create_slot": false,
7122
"enabled": false,
72-
"connect": true,
23+
"connect": false,
7324
"slot_name": "test_create_subscription",
7425
"sync": "remote_apply",
7526
"streaming": true,

0 commit comments

Comments
 (0)