froth-webdriverio-framework 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@ async function dbtype(jsondata) {
|
|
|
26
26
|
connectionpool = mysqlconnect.connectToMySQL(jsondata.host, jsondata.username, jsondata.password, jsondata.schema_name, jsondata.port_number);
|
|
27
27
|
break;
|
|
28
28
|
case 'PostgreSQL':
|
|
29
|
-
connectionpool = await postgreSqlConnect.connectToPostgreSQL(jsondata.
|
|
29
|
+
connectionpool = await postgreSqlConnect.connectToPostgreSQL(jsondata.host, jsondata.username, jsondata.password, jsondata.schema_name, jsondata.port_number);
|
|
30
30
|
break;
|
|
31
31
|
default:
|
|
32
32
|
console.log('Unknown dbtype.');
|
package/db/postgresOperations.js
CHANGED
|
@@ -10,7 +10,7 @@ async function connectToPostgreSQL(hostname, username, password1, dbname, portnu
|
|
|
10
10
|
user: username,
|
|
11
11
|
password: password1,
|
|
12
12
|
database: dbname,
|
|
13
|
-
port:
|
|
13
|
+
port: portnumber // Increased connection timeout
|
|
14
14
|
};
|
|
15
15
|
// const poolConfig = new Pool({
|
|
16
16
|
// user: "postgres",
|
|
@@ -54,7 +54,7 @@ async function fetchDataFromPostgresDB(connectionpool, query) {
|
|
|
54
54
|
console.log(JSON.stringify(finalResult, null, 2));
|
|
55
55
|
} catch (error) {
|
|
56
56
|
console.error('Error fetching data:', error);
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
} finally {
|
|
59
59
|
if (connection) {
|
|
60
60
|
connection.release();
|