Skip to content

Commit

Permalink
Ensure the query tool is launched successfully for the servers regist…
Browse files Browse the repository at this point in the history
…ered with the PostgreSQL service. #5575
  • Loading branch information
yogeshmahajan-1903 authored Nov 28, 2022
1 parent 13bbaf9 commit 7710d5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions web/pgadmin/tools/sqleditor/static/js/show_query_tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export function generateUrl(trans_id, parentData, sqlId) {
if(parentData.database.label) {
url_endpoint += `&database_name=${parentData.database.label}`;
}
if(parentData.server.user.name){
url_endpoint += `&user=${parentData.server.user.name}`;
}
}

if(sqlId) {
Expand Down
1 change: 1 addition & 0 deletions web/pgadmin/tools/sqleditor/static/js/show_view_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function generateUrl(trans_id, connectionData, nodeData, parentData) {
+`&sgid=${parentData.server_group._id}`
+`&sid=${parentData.server._id}`
+`&did=${parentData.database._id}`
+`&user=${parentData.server.user.name}`
+`&server_type=${parentData.server.server_type}`;

return url_endpoint;
Expand Down
6 changes: 3 additions & 3 deletions web/regression/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def execute_test(test_module_list_passed, server_passed, driver_passed,

# This is required when some tests are running parallel
# & some sequential in case of parallel ui tests
if threading.current_thread().get_name() == "sequential_tests":
if threading.current_thread().getName() == "sequential_tests":
try:
if test_result[server_passed['name']][0] is not None:
ran_tests = test_result[server_passed['name']][0] + \
Expand Down Expand Up @@ -565,14 +565,14 @@ def execute_test(test_module_list_passed, server_passed, driver_passed,
print(str(exc))
print("Exception in {0} {1}".format(
threading.current_thread().ident,
threading.current_thread().get_name()))
threading.current_thread().getName()))
# Mark failure as true
global failure
failure = True
finally:
# Delete web-driver instance
thread_name = "parallel_tests" + server_passed['name']
if threading.current_thread().get_name() == thread_name:
if threading.current_thread().getName() == thread_name:
test_utils.quit_webdriver(driver_passed)
time.sleep(20)

Expand Down

0 comments on commit 7710d5e

Please sign in to comment.