Skip to content

Commit

Permalink
Add sleep in restrict_drop_user_role file (#3027) (#3029)
Browse files Browse the repository at this point in the history
Add sleep in restrict_drop_user_role testfile after termination the active session to give time to sync.

Signed-off-by: ANJU BHARTI <[email protected]>
Co-authored-by: ANJU BHARTI <[email protected]>
  • Loading branch information
anju15bharti and ANJU BHARTI authored Oct 19, 2024
1 parent f00505b commit 06cc0c3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/JDBC/expected/restrict_drop_user_role.out
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ t
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
drop login no_priv_login1
Expand All @@ -305,6 +313,15 @@ t
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
drop login no_priv_login2
go
Expand Down Expand Up @@ -362,6 +379,15 @@ bool
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
use restrict_user_db1
go
Expand Down
26 changes: 26 additions & 0 deletions test/JDBC/expected/single_db/restrict_drop_user_role.out
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ t
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
drop login no_priv_login1
Expand All @@ -305,6 +313,15 @@ t
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
drop login no_priv_login2
go
Expand Down Expand Up @@ -366,6 +383,15 @@ bool
~~END~~


-- Wait to sync with another session
SELECT pg_sleep(1);
go
~~START~~
void

~~END~~


-- tsql
use restrict_user_db1
go
Expand Down
11 changes: 11 additions & 0 deletions test/JDBC/input/restrict_drop_user_role.mix
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ SELECT pg_terminate_backend(pid) FROM pg_stat_get_activity(NULL)
WHERE sys.suser_name(usesysid) = 'no_priv_login1' AND backend_type = 'client backend' AND usesysid IS NOT NULL;
go

-- Wait to sync with another session
SELECT pg_sleep(1);
go

-- tsql
drop login no_priv_login1
Expand All @@ -199,6 +202,10 @@ SELECT pg_terminate_backend(pid) FROM pg_stat_get_activity(NULL)
WHERE sys.suser_name(usesysid) = 'no_priv_login2' AND backend_type = 'client backend' AND usesysid IS NOT NULL;
go

-- Wait to sync with another session
SELECT pg_sleep(1);
go

-- tsql
drop login no_priv_login2
go
Expand Down Expand Up @@ -244,6 +251,10 @@ SELECT pg_terminate_backend(pid) FROM pg_stat_get_activity(NULL)
WHERE sys.suser_name(usesysid) = 'restrict_user_l1' AND backend_type = 'client backend' AND usesysid IS NOT NULL;
go

-- Wait to sync with another session
SELECT pg_sleep(1);
go

-- tsql
use restrict_user_db1
go
Expand Down

0 comments on commit 06cc0c3

Please sign in to comment.