Commit Graph

150 Commits

Author SHA1 Message Date
Surinder Kumar
aee1492d0d Correct some EDB Postgres Advanced Server branding. 2017-03-21 10:12:26 +00:00
Murtuza Zabuawala
e9702752d9 Fix hadling of DATERANGE[] type. Fixes #2258 2017-03-17 12:40:08 +00:00
Harshal Dhumal
e4134695e5 Fix dropping of databases with Unicode names. Fixes #2243
1. Pickup correct encoding in qtLiteral to decode.
2. While releasing database connection only decode database name if it's not unicode.
2017-03-17 10:33:03 +00:00
Dave Page
b2a74ad26d Fix a bunch of file headers. 2017-03-16 14:27:55 +00:00
Ashesh Vashi
6cc1fbe739 Import config only when needed, it was causing cyclic dependency when
running the regression suite.
2017-03-07 16:07:10 +05:30
Jonas Thelemann
c34f5fd2d4 Use "could not" consistently, instead of "couldn't" which was used in some places. 2017-03-07 10:29:54 +00:00
Ashesh Vashi
f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
Harshal Dhumal
ffa8d94e76 Better handling the non-ascii characters for different database objects.
Using 'psycopg2.extensions.UNICODE' (for Python < 3) in the psycopg2
driver for proper conversation of unicode characters. Also - adjusted
the string typecaster to take care of different character types (char,
character, text, name, character varying, and their array types).

Reviewed by: Dave Page, Murtuza Zabuawala & Akshay Joshi
2017-03-02 15:09:28 +05:30
Atira Odhner
e89c54c15d Make feature test app teardown more reliable, and tests faster
- don't spin up app and chromedriver between each test
    - catching signals also tears down the app
    - do layout reset between tests, but assume that tests will not leave a modal opened.

 Use selenium built-in waiting function and fix flakiness around clicking the alertify OK button

    - we think the OK button does not have its event bound when it is created.

If you see more flakiness around clicking the alertify OK button, let us know. The element is clickable but we have to arbitrarily wait for the event to be bound and that timing may vary system to system.

The feature tests are about 7 seconds faster now.

Tira & Joao
2017-03-01 13:20:06 +00:00
Murtuza Zabuawala
480e00fddf Query tool efficiency.Convert the data as a 2D array instead of dict. Fixes #2036
Incremental back off when polling. Fixes #2038

Initial Patch By: Dave Page
2017-03-01 16:58:51 +05:30
Surinder Kumar
88cae263b2 Fix display of long integers and decimals. Fixes #2039. Fixes #2119. Fixes #2154 2017-02-24 13:39:40 +00:00
Atira Odhner
fe1aec5de0 Add feature test framework, using selenium and chromedriver for UI testing.
Written by both George and Atira at Pivotal.
2017-02-22 12:41:28 +00:00
Murtuza Zabuawala
9ad1316990 Various encoding fixes. Fixes #2160 2017-02-16 11:00:40 +00:00
Atira Odhner
b6486f3d42 Test suite runner enhancements:
To chase down a set of tests that were failing together, we wanted to run
deeper trees of tests. We changed the behavior of the --pkg argument to
runtests.py so it runs tests under a package and its subpackages, instead
of for a single node.

It gave us more flexibility in what tests to run. This also includes the
--exclude option.

To run tests for a single node, ".tests" can be appended to the package path.

Tira & George.
2017-02-15 15:10:31 +00:00
Harshal Dhumal
4ef26a528b Allow direct navigation (i.e. typing of paths) in the file manager. Fixes #1911 2017-02-03 10:51:36 +01:00
Murtuza Zabuawala
2d442da9ff Properly handle setting comments and other options on databases with allowconn = False. Fixes #2024 2017-02-01 10:23:45 +00:00
George Gelashvili
6d05302ca1 Rename the 9.1_plus templates to "default" to more appropriately support Greenplum which is based on 8.3. 2017-02-01 09:57:49 +00:00
Murtuza Zabuawala
0da8d1fe4c Another Python 3 fix. 2017-01-31 12:12:22 +00:00
Murtuza Zabuawala
2e5771e164 Python 3 fix for the template loader test. 2017-01-31 10:02:20 +00:00
Atira Odhner
c6b67fc66a Bypass recovery checks with older servers. This is required for Greenplum which is based on PG 8.3 at present. 2017-01-30 17:02:55 +00:00
George Gelashvili
19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
Dave Page
1504d05cdd Format JSON more efficiently. This can significantly reduce response sizes from the server. 2017-01-06 14:09:36 +00:00
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Akshay Joshi
e160909423 Quote identifiers correctly in auto-complete. Fixes #1992 2016-12-05 13:15:03 +09:00
Dave Page
961f946a76 Treat empty text settings as unset, to allow users to clear a string to get the default back. 2016-11-23 12:43:02 +00:00
Dave Page
ca333ea6a7 Don't strip \r\n from "Download as CSV" batches of rows, as it leads to malformed data. Fixes #1936 2016-11-07 14:47:50 +00:00
Navnath Gadakh
36c185e9dc Fix regression test import issue. 2016-10-13 06:49:33 -07:00
Navnath Gadakh
ae612f5403 Major update to the test suite:
1. Code changes (due to drop objects functionality).
2. Quoting for database names in drop databases.
3. Code changes for import errors for pickle_path and advanced_config variables.
2016-10-07 13:59:43 +01:00
Murtuza Zabuawala
bde3dd845b Fix SSL setup. Fixes #1817 2016-10-05 13:05:10 +01:00
Ashesh Vashi
09c2d605c9 Prevent bigints getting rounded. Fixes #1547 2016-09-26 15:51:01 +01:00
Murtuza Zabuawala
a0a6428e86 Ensure compatibility with newer sqlparse modules. Fixes #1725 2016-09-26 13:49:54 +01:00
Harshal Dhumal
f117685d77 Drop all connections from the connection manager when a server is dropped to avoid issues if sqlite reuses an ID. Fixes #1720 2016-09-22 12:57:52 +01:00
Dave Page
2077bd5fdc Prevent browsers caching responses. Fixes #1171 2016-09-21 16:18:22 +01:00
Surinder Kumar
28ce31a022 Save error details when executing to CSV, if no data is returned. This ensures the user gets some feedback rather than nothing at all. Fixes #1592 2016-09-20 11:57:51 +01:00
Murtuza Zabuawala
881d2a60a4 Fix an exception that could occur when the browser pings the server following a restart. Fixes #1707 2016-09-19 15:57:52 +01:00
Navnath Gadakh
d3d8836f61 Introduce a test config database for the regression tests, and track/remove objects that are created during testing. 2016-09-14 16:26:12 +01:00
Murtuza Zabuawala
42e19d2169 Fix error highlighting, broken in d6391c7e9b. Fixes #1676 2016-09-09 14:45:03 +01:00
Surinder Kumar
da21cabb1e Fix typo in connection handler. 2016-09-07 14:01:56 +01:00
Murtuza Zabuawala
679ad6fca8 Support range types in the query tool. Fixes #1658 2016-09-06 14:26:43 +01:00
Murtuza Zabuawala
1b75679ec4 Python 2.6 fixes. Fixes #1636. Fixes #1659 2016-09-06 14:07:30 +01:00
Ashesh Vashi
8ac65070bc Improve the logic for Bad handling of missing connection database server RM #1387 2016-09-06 15:35:20 +05:30
Ashesh Vashi
f12d981a9d Handling the bad/lost connection of a database server.
Made backend changes for:
* Taking care of the connection status in the psycopg2 driver. And, when
  the connection is lost, it throws a exception with 503 http status
  message, and connection lost information in it.
* Allowing the flask application to propagate the exceptions even in the
  release mode.
* Utilising the existing password (while reconnection, if not
  disconnected explicitly).
* Introduced a new ajax response message 'service_unavailable' (http
  status code: 503), which suggests temporary service unavailable.

Client (front-end) changes:
* To handle the connection lost of a database server for different
  operations by generating proper events, and handle them properly.

Removed the connection status check code from different nodes, so that
- it generates the proper exception, when accessing the non-alive
  connection.

Fixes #1387
2016-08-29 12:01:35 +05:30
Akshay Joshi
86858b18f6 Fix validation of numeric preference min/max values. Fixes #1567 2016-08-19 11:00:05 +01:00
Murtuza Zabuawala
d6391c7e9b Properly display messages from the server in the query tool. Fixes #1523 2016-08-18 17:08:40 +01:00
Navnath Gadakh
81e2bc1e80 Test suite enhancements:
1. The user will specify the tablespace path in test_config.json.in
2.  If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3.  Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4.  Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
2016-08-09 16:05:40 +01:00
Harshal Dhumal
f78024808e Prevent the user attempting to run external commands if the bin path is not configured. Fixes #1177 2016-08-08 11:59:37 +01:00
Murtuza Zabuawala
01252a13cf Further misc quoting/encoding related fixes. 2016-08-01 15:23:06 +01:00
Navnath Gadakh
5c3c543d2e Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and  PPAS are included in both .in files.

- Removed the logic of logging in  the test client on each test scenario(As per Khushboo's comment in previous email).  We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and  invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
2016-07-27 15:33:36 +01:00
Murtuza Zabuawala
06e881570a Fix numerous encoding issues. Fixes #1307. Fixes #1479 2016-07-26 15:05:14 +01:00
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00