public inbox for [email protected]
help / color / mirror / Atom feedpgAdmin4: Test-suite OS compatability issue
10+ messages / 2 participants
[nested] [flat]
* pgAdmin4: Test-suite OS compatability issue
@ 2017-04-28 13:51 Navnath Gadakh <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Navnath Gadakh @ 2017-04-28 13:51 UTC (permalink / raw)
To: pgadmin-hackers; +Cc: Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
Hi Dave,
Please find the patch for OS compatability issue of test-suite.
*Code Changes:*
1. Minor code changes done related to os module in
*pgadmin4/web/regression/feature_utils/app_starter.py*
2. Code added in
pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
*to handle path for SQL file.
3. Code added to convert unicode to string in some .py files.
*Note:*
With python2.6.6 test-suite is failed to execute. I have
created the RM 2367 <https://redmine.postgresql.org/issues/2367;
Thank you!
--
Regards,
Navnath Gadakh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] testsuite_os_compatability_issue.patch (5.2K, 3-testsuite_os_compatability_issue.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index 5374b878..4ba56033 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -33,34 +33,37 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
def test_get_source_returns_a_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/9.1_plus/some_action.sql")
-
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_1_returns_9_1_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90100#/some_action.sql")
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_3_and_there_are_templates_for_9_2_and_9_1_returns_9_2_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.2_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90300#/some_action.sql")
- self.assertEqual("Some 9.2 SQL", content)
- self.assertIn("some_feature/sql/9.2_plus/some_action.sql", filename)
+ self.assertEqual("Some 9.2 SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_0_and_there_are_templates_for_9_1_and_9_2_returns_default_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "default", "some_action_with_default.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90000#/some_action_with_default.sql")
- self.assertEqual("Some default SQL", content)
- self.assertIn("some_feature/sql/default/some_action_with_default.sql", filename)
+ self.assertEqual("Some default SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_raise_not_found_exception_when_postgres_version_less_than_all_available_sql_templates(self):
diff --git a/web/regression/feature_utils/app_starter.py b/web/regression/feature_utils/app_starter.py
index b03f2a94..98762ca2 100644
--- a/web/regression/feature_utils/app_starter.py
+++ b/web/regression/feature_utils/app_starter.py
@@ -27,13 +27,11 @@ class AppStarter:
random_server_port = str(random.randint(10000, 65535))
env = {
"PGADMIN_PORT": random_server_port,
- "SQLITE_PATH": self.app_config.TEST_SQLITE_PATH
+ "SQLITE_PATH": str(self.app_config.TEST_SQLITE_PATH)
}
env.update(os.environ)
-
self.pgadmin_process = subprocess.Popen(["python", "pgAdmin4.py"],
shell=False,
- preexec_fn=os.setsid,
stderr=open(os.devnull, 'w'),
env=env)
@@ -43,4 +41,4 @@ class AppStarter:
def stop_app(self):
self.driver.quit()
- os.killpg(os.getpgid(self.pgadmin_process.pid), signal.SIGTERM)
+ os.kill(self.pgadmin_process.pid, signal.SIGTERM)
diff --git a/web/regression/runtests.py b/web/regression/runtests.py
index 5f4a3d0c..3ab75128 100644
--- a/web/regression/runtests.py
+++ b/web/regression/runtests.py
@@ -67,10 +67,10 @@ if pgadmin_credentials:
for item in ['login_username', 'login_password']):
pgadmin_credentials = pgadmin_credentials[
'pgAdmin4_login_credentials']
- os.environ['PGADMIN_SETUP_EMAIL'] = pgadmin_credentials[
- 'login_username']
- os.environ['PGADMIN_SETUP_PASSWORD'] = pgadmin_credentials[
- 'login_password']
+ os.environ['PGADMIN_SETUP_EMAIL'] = str(pgadmin_credentials[
+ 'login_username'])
+ os.environ['PGADMIN_SETUP_PASSWORD'] = str(pgadmin_credentials[
+ 'login_password'])
# Execute the setup file
exec (open("setup.py").read())
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-02 11:09 Dave Page <[email protected]>
parent: Navnath Gadakh <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Page @ 2017-05-02 11:09 UTC (permalink / raw)
To: Navnath Gadakh <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
Hi
When testing on Mac, the testsuite never exits with this patch applied. It
just hangs after printing the result summary.
On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
[email protected]> wrote:
> Hi Dave,
>
> Please find the patch for OS compatability issue of test-suite.
>
> *Code Changes:*
>
> 1. Minor code changes done related to os module in
> *pgadmin4/web/regression/feature_utils/app_starter.py*
> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
> *to handle path for SQL file.
> 3. Code added to convert unicode to string in some .py files.
>
> *Note:*
> With python2.6.6 test-suite is failed to execute. I have
> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>
> Thank you!
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-03 06:13 Navnath Gadakh <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Navnath Gadakh @ 2017-05-03 06:13 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
Hi Dave,
I have applied and run this patch on Mac and it ran successfully
without hang up.
I used different OS:
OS X Yosemite Version 10.10.2
OS X EI Capitan Version 10.11.6
What is your system config?
On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
> Hi
>
> When testing on Mac, the testsuite never exits with this patch applied. It
> just hangs after printing the result summary.
>
> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>> Please find the patch for OS compatability issue of test-suite.
>>
>> *Code Changes:*
>>
>> 1. Minor code changes done related to os module in
>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>> *to handle path for SQL file.
>> 3. Code added to convert unicode to string in some .py files.
>>
>> *Note:*
>> With python2.6.6 test-suite is failed to execute. I have
>> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>>
>> Thank you!
>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>>
>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list ([email protected])
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Regards,
Navnath Gadakh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-03 08:09 Dave Page <[email protected]>
parent: Navnath Gadakh <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Page @ 2017-05-03 08:09 UTC (permalink / raw)
To: Navnath Gadakh <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the system
Python installation. Packages are:
(pgadmin4)piranha:~ dpage$ pip freeze
alabaster==0.7.10
alembic==0.9.1
args==0.1.0
Babel==1.3
beautifulsoup4==4.4.1
blinker==1.3
chromedriver-installer==0.0.6
click==6.6
clint==0.5.1
dateutils==0.6.6
docutils==0.13.1
extras==1.0.0
fixtures==3.0.0
Flask==0.11.1
Flask-Babel==0.11.1
Flask-Gravatar==0.4.2
Flask-HTMLmin==1.2
Flask-Login==0.3.2
Flask-Mail==0.9.1
Flask-Migrate==2.0.3
Flask-Principal==0.4.0
Flask-Script==2.0.5
Flask-Security==1.7.5
Flask-SQLAlchemy==2.1
Flask-WTF==0.12
html5lib==1.0b3
htmlmin==0.1.10
imagesize==0.7.1
importlib==1.0.3
itsdangerous==0.24
Jinja2==2.7.3
linecache2==1.0.0
Mako==1.0.6
MarkupSafe==0.23
minify==0.1.4
passlib==1.6.2
pbr==2.0.0
pkginfo==1.4.1
psycopg2==2.6.2
pycrypto==2.6.1
Pygments==2.2.0
pyperclip==1.5.27
pyrsistent==0.12.1
python-dateutil==2.5.0
python-editor==1.0.3
python-mimeparse==1.6.0
pytz==2014.10
requests==2.13.0
requests-toolbelt==0.7.1
selenium==3.3.1
simplejson==3.6.5
six==1.10.0
snowballstemmer==1.2.1
speaklater==1.3
Sphinx==1.5.3
SQLAlchemy==1.0.14
sqlparse==0.1.19
testscenarios==0.5.0
testtools==2.0.0
traceback2==1.4.0
unittest2==1.1.0
Werkzeug==0.9.6
WTForms==2.0.2
On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
[email protected]> wrote:
> Hi Dave,
>
> I have applied and run this patch on Mac and it ran successfully
> without hang up.
>
> I used different OS:
> OS X Yosemite Version 10.10.2
> OS X EI Capitan Version 10.11.6
>
> What is your system config?
>
>
>
>
> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> When testing on Mac, the testsuite never exits with this patch applied.
>> It just hangs after printing the result summary.
>>
>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find the patch for OS compatability issue of test-suite.
>>>
>>> *Code Changes:*
>>>
>>> 1. Minor code changes done related to os module in
>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>> *to handle path for SQL file.
>>> 3. Code added to convert unicode to string in some .py files.
>>>
>>> *Note:*
>>> With python2.6.6 test-suite is failed to execute. I have
>>> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>>>
>>> Thank you!
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Navnath Gadakh
>>>
>>> EnterpriseDB Corporation
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list ([email protected])
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-03 12:32 Navnath Gadakh <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Navnath Gadakh @ 2017-05-03 12:32 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
to Sierra(10.12.4). I have applied the patch and it ran successfully
without any hangup.
This is my console output:
*======================================================================*
*Test Result Summary*
*======================================================================*
*REGRESSION TEST 1 PostgreSQL 9.6:*
*140 tests passed*
*0 test failed*
*16 tests skipped:*
*PackageAddTestCase (Fetch Package Node URL)*
*PackageDeleteTestCase (Fetch Package Node URL)*
*PackageGetTestCase (Fetch Package Node URL)*
*PackagePutTestCase (Fetch Package Node URL)*
*SynonymAddTestCase (Default Node URL)*
*SynonymDeleteTestCase (Fetch synonym Node URL)*
*SynonymGetTestCase (Fetch synonym Node URL)*
*SynonymPutTestCase (Fetch synonym Node URL)*
*ResourceGroupsAddTestCase (Add resource groups)*
*ResourceGroupsDeleteTestCase (Delete resource groups)*
*ResourceGroupsPutTestCase (Put resource groups)*
*ResourceGroupsGetTestCase (Get resource groups)*
*TableSpaceAddTestCase (Check Tablespace Node)*
*TableSpaceDeleteTestCase (Check Tablespace Node)*
*TablespaceGetTestCase (Check Tablespace Node)*
*TableSpaceUpdateTestCase (Check Tablespace Node)*
*======================================================================*
*Please check output in file:
/Users/edb/Navnath/pgadmin4/web/regression/regression.log*
*(pgenv36) Laptop227-pn-in:regression Navnath$ *
On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the system
> Python installation. Packages are:
>
> (pgadmin4)piranha:~ dpage$ pip freeze
> alabaster==0.7.10
> alembic==0.9.1
> args==0.1.0
> Babel==1.3
> beautifulsoup4==4.4.1
> blinker==1.3
> chromedriver-installer==0.0.6
> click==6.6
> clint==0.5.1
> dateutils==0.6.6
> docutils==0.13.1
> extras==1.0.0
> fixtures==3.0.0
> Flask==0.11.1
> Flask-Babel==0.11.1
> Flask-Gravatar==0.4.2
> Flask-HTMLmin==1.2
> Flask-Login==0.3.2
> Flask-Mail==0.9.1
> Flask-Migrate==2.0.3
> Flask-Principal==0.4.0
> Flask-Script==2.0.5
> Flask-Security==1.7.5
> Flask-SQLAlchemy==2.1
> Flask-WTF==0.12
> html5lib==1.0b3
> htmlmin==0.1.10
> imagesize==0.7.1
> importlib==1.0.3
> itsdangerous==0.24
> Jinja2==2.7.3
> linecache2==1.0.0
> Mako==1.0.6
> MarkupSafe==0.23
> minify==0.1.4
> passlib==1.6.2
> pbr==2.0.0
> pkginfo==1.4.1
> psycopg2==2.6.2
> pycrypto==2.6.1
> Pygments==2.2.0
> pyperclip==1.5.27
> pyrsistent==0.12.1
> python-dateutil==2.5.0
> python-editor==1.0.3
> python-mimeparse==1.6.0
> pytz==2014.10
> requests==2.13.0
> requests-toolbelt==0.7.1
> selenium==3.3.1
> simplejson==3.6.5
> six==1.10.0
> snowballstemmer==1.2.1
> speaklater==1.3
> Sphinx==1.5.3
> SQLAlchemy==1.0.14
> sqlparse==0.1.19
> testscenarios==0.5.0
> testtools==2.0.0
> traceback2==1.4.0
> unittest2==1.1.0
> Werkzeug==0.9.6
> WTForms==2.0.2
>
>
> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>> I have applied and run this patch on Mac and it ran successfully
>> without hang up.
>>
>> I used different OS:
>> OS X Yosemite Version 10.10.2
>> OS X EI Capitan Version 10.11.6
>>
>> What is your system config?
>>
>>
>>
>>
>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>
>>> Hi
>>>
>>> When testing on Mac, the testsuite never exits with this patch applied.
>>> It just hangs after printing the result summary.
>>>
>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>> [email protected]> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Please find the patch for OS compatability issue of test-suite.
>>>>
>>>> *Code Changes:*
>>>>
>>>> 1. Minor code changes done related to os module in
>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>> *to handle path for SQL file.
>>>> 3. Code added to convert unicode to string in some .py
>>>> files.
>>>>
>>>> *Note:*
>>>> With python2.6.6 test-suite is failed to execute. I have
>>>> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>>>>
>>>> Thank you!
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Navnath Gadakh
>>>>
>>>> EnterpriseDB Corporation
>>>> The Enterprise PostgreSQL Company
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent via pgadmin-hackers mailing list ([email protected])
>>>> To make changes to your subscription:
>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Regards,
Navnath Gadakh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-04 08:48 Dave Page <[email protected]>
parent: Navnath Gadakh <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Page @ 2017-05-04 08:48 UTC (permalink / raw)
To: Navnath Gadakh <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>
I still see the issue. See the attached screenshot. Killing process 32287
caused the test suite to exit.[image: Inline image 1]
On Wed, May 3, 2017 at 1:32 PM, Navnath Gadakh <
[email protected]> wrote:
> It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
> to Sierra(10.12.4). I have applied the patch and it ran successfully
> without any hangup.
>
> This is my console output:
>
> *======================================================================*
>
> *Test Result Summary*
>
> *======================================================================*
>
> *REGRESSION TEST 1 PostgreSQL 9.6:*
>
> *140 tests passed*
>
> *0 test failed*
>
> *16 tests skipped:*
>
> *PackageAddTestCase (Fetch Package Node URL)*
>
> *PackageDeleteTestCase (Fetch Package Node URL)*
>
> *PackageGetTestCase (Fetch Package Node URL)*
>
> *PackagePutTestCase (Fetch Package Node URL)*
>
> *SynonymAddTestCase (Default Node URL)*
>
> *SynonymDeleteTestCase (Fetch synonym Node URL)*
>
> *SynonymGetTestCase (Fetch synonym Node URL)*
>
> *SynonymPutTestCase (Fetch synonym Node URL)*
>
> *ResourceGroupsAddTestCase (Add resource groups)*
>
> *ResourceGroupsDeleteTestCase (Delete resource groups)*
>
> *ResourceGroupsPutTestCase (Put resource groups)*
>
> *ResourceGroupsGetTestCase (Get resource groups)*
>
> *TableSpaceAddTestCase (Check Tablespace Node)*
>
> *TableSpaceDeleteTestCase (Check Tablespace Node)*
>
> *TablespaceGetTestCase (Check Tablespace Node)*
>
> *TableSpaceUpdateTestCase (Check Tablespace Node)*
>
> *======================================================================*
>
> *Please check output in file:
> /Users/edb/Navnath/pgadmin4/web/regression/regression.log*
>
> *(pgenv36) Laptop227-pn-in:regression Navnath$ *
>
>
>
> On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
>
>> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the system
>> Python installation. Packages are:
>>
>> (pgadmin4)piranha:~ dpage$ pip freeze
>> alabaster==0.7.10
>> alembic==0.9.1
>> args==0.1.0
>> Babel==1.3
>> beautifulsoup4==4.4.1
>> blinker==1.3
>> chromedriver-installer==0.0.6
>> click==6.6
>> clint==0.5.1
>> dateutils==0.6.6
>> docutils==0.13.1
>> extras==1.0.0
>> fixtures==3.0.0
>> Flask==0.11.1
>> Flask-Babel==0.11.1
>> Flask-Gravatar==0.4.2
>> Flask-HTMLmin==1.2
>> Flask-Login==0.3.2
>> Flask-Mail==0.9.1
>> Flask-Migrate==2.0.3
>> Flask-Principal==0.4.0
>> Flask-Script==2.0.5
>> Flask-Security==1.7.5
>> Flask-SQLAlchemy==2.1
>> Flask-WTF==0.12
>> html5lib==1.0b3
>> htmlmin==0.1.10
>> imagesize==0.7.1
>> importlib==1.0.3
>> itsdangerous==0.24
>> Jinja2==2.7.3
>> linecache2==1.0.0
>> Mako==1.0.6
>> MarkupSafe==0.23
>> minify==0.1.4
>> passlib==1.6.2
>> pbr==2.0.0
>> pkginfo==1.4.1
>> psycopg2==2.6.2
>> pycrypto==2.6.1
>> Pygments==2.2.0
>> pyperclip==1.5.27
>> pyrsistent==0.12.1
>> python-dateutil==2.5.0
>> python-editor==1.0.3
>> python-mimeparse==1.6.0
>> pytz==2014.10
>> requests==2.13.0
>> requests-toolbelt==0.7.1
>> selenium==3.3.1
>> simplejson==3.6.5
>> six==1.10.0
>> snowballstemmer==1.2.1
>> speaklater==1.3
>> Sphinx==1.5.3
>> SQLAlchemy==1.0.14
>> sqlparse==0.1.19
>> testscenarios==0.5.0
>> testtools==2.0.0
>> traceback2==1.4.0
>> unittest2==1.1.0
>> Werkzeug==0.9.6
>> WTForms==2.0.2
>>
>>
>> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>> I have applied and run this patch on Mac and it ran
>>> successfully without hang up.
>>>
>>> I used different OS:
>>> OS X Yosemite Version 10.10.2
>>> OS X EI Capitan Version 10.11.6
>>>
>>> What is your system config?
>>>
>>>
>>>
>>>
>>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> When testing on Mac, the testsuite never exits with this patch applied.
>>>> It just hangs after printing the result summary.
>>>>
>>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Please find the patch for OS compatability issue of
>>>>> test-suite.
>>>>>
>>>>> *Code Changes:*
>>>>>
>>>>> 1. Minor code changes done related to os module in
>>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>>> *to handle path for SQL file.
>>>>> 3. Code added to convert unicode to string in some .py
>>>>> files.
>>>>>
>>>>> *Note:*
>>>>> With python2.6.6 test-suite is failed to execute. I have
>>>>> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>>>>>
>>>>> Thank you!
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Navnath Gadakh
>>>>>
>>>>> EnterpriseDB Corporation
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent via pgadmin-hackers mailing list ([email protected])
>>>>> To make changes to your subscription:
>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Navnath Gadakh
>>>
>>> EnterpriseDB Corporation
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[image/png] Screen Shot 2017-05-04 at 09.32.53.png (60.3K, 3-Screen%20Shot%202017-05-04%20at%2009.32.53.png)
download | view image
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-04 11:53 Navnath Gadakh <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Navnath Gadakh @ 2017-05-04 11:53 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>; Hamid Quddus <[email protected]>
Hi Dave,
Please find the revised patch. I have added some print statements
for debug purpose, so that I can get which line causing this issue. Most
probably issue should be in the cleanup process.
Please apply the patch and run the regression. Send me your console output
and *regression.log* file
Thanks!
On Thu, May 4, 2017 at 2:18 PM, Dave Page <[email protected]> wrote:
> I still see the issue. See the attached screenshot. Killing process 32287
> caused the test suite to exit.[image: Inline image 1]
>
> On Wed, May 3, 2017 at 1:32 PM, Navnath Gadakh <
> [email protected]> wrote:
>
>> It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
>> to Sierra(10.12.4). I have applied the patch and it ran successfully
>> without any hangup.
>>
>> This is my console output:
>>
>> *======================================================================*
>>
>> *Test Result Summary*
>>
>> *======================================================================*
>>
>> *REGRESSION TEST 1 PostgreSQL 9.6:*
>>
>> *140 tests passed*
>>
>> *0 test failed*
>>
>> *16 tests skipped:*
>>
>> *PackageAddTestCase (Fetch Package Node URL)*
>>
>> *PackageDeleteTestCase (Fetch Package Node URL)*
>>
>> *PackageGetTestCase (Fetch Package Node URL)*
>>
>> *PackagePutTestCase (Fetch Package Node URL)*
>>
>> *SynonymAddTestCase (Default Node URL)*
>>
>> *SynonymDeleteTestCase (Fetch synonym Node URL)*
>>
>> *SynonymGetTestCase (Fetch synonym Node URL)*
>>
>> *SynonymPutTestCase (Fetch synonym Node URL)*
>>
>> *ResourceGroupsAddTestCase (Add resource groups)*
>>
>> *ResourceGroupsDeleteTestCase (Delete resource groups)*
>>
>> *ResourceGroupsPutTestCase (Put resource groups)*
>>
>> *ResourceGroupsGetTestCase (Get resource groups)*
>>
>> *TableSpaceAddTestCase (Check Tablespace Node)*
>>
>> *TableSpaceDeleteTestCase (Check Tablespace Node)*
>>
>> *TablespaceGetTestCase (Check Tablespace Node)*
>>
>> *TableSpaceUpdateTestCase (Check Tablespace Node)*
>>
>> *======================================================================*
>>
>> *Please check output in file:
>> /Users/edb/Navnath/pgadmin4/web/regression/regression.log*
>>
>> *(pgenv36) Laptop227-pn-in:regression Navnath$ *
>>
>>
>>
>> On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
>>
>>> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the
>>> system Python installation. Packages are:
>>>
>>> (pgadmin4)piranha:~ dpage$ pip freeze
>>> alabaster==0.7.10
>>> alembic==0.9.1
>>> args==0.1.0
>>> Babel==1.3
>>> beautifulsoup4==4.4.1
>>> blinker==1.3
>>> chromedriver-installer==0.0.6
>>> click==6.6
>>> clint==0.5.1
>>> dateutils==0.6.6
>>> docutils==0.13.1
>>> extras==1.0.0
>>> fixtures==3.0.0
>>> Flask==0.11.1
>>> Flask-Babel==0.11.1
>>> Flask-Gravatar==0.4.2
>>> Flask-HTMLmin==1.2
>>> Flask-Login==0.3.2
>>> Flask-Mail==0.9.1
>>> Flask-Migrate==2.0.3
>>> Flask-Principal==0.4.0
>>> Flask-Script==2.0.5
>>> Flask-Security==1.7.5
>>> Flask-SQLAlchemy==2.1
>>> Flask-WTF==0.12
>>> html5lib==1.0b3
>>> htmlmin==0.1.10
>>> imagesize==0.7.1
>>> importlib==1.0.3
>>> itsdangerous==0.24
>>> Jinja2==2.7.3
>>> linecache2==1.0.0
>>> Mako==1.0.6
>>> MarkupSafe==0.23
>>> minify==0.1.4
>>> passlib==1.6.2
>>> pbr==2.0.0
>>> pkginfo==1.4.1
>>> psycopg2==2.6.2
>>> pycrypto==2.6.1
>>> Pygments==2.2.0
>>> pyperclip==1.5.27
>>> pyrsistent==0.12.1
>>> python-dateutil==2.5.0
>>> python-editor==1.0.3
>>> python-mimeparse==1.6.0
>>> pytz==2014.10
>>> requests==2.13.0
>>> requests-toolbelt==0.7.1
>>> selenium==3.3.1
>>> simplejson==3.6.5
>>> six==1.10.0
>>> snowballstemmer==1.2.1
>>> speaklater==1.3
>>> Sphinx==1.5.3
>>> SQLAlchemy==1.0.14
>>> sqlparse==0.1.19
>>> testscenarios==0.5.0
>>> testtools==2.0.0
>>> traceback2==1.4.0
>>> unittest2==1.1.0
>>> Werkzeug==0.9.6
>>> WTForms==2.0.2
>>>
>>>
>>> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
>>> [email protected]> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> I have applied and run this patch on Mac and it ran
>>>> successfully without hang up.
>>>>
>>>> I used different OS:
>>>> OS X Yosemite Version 10.10.2
>>>> OS X EI Capitan Version 10.11.6
>>>>
>>>> What is your system config?
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> When testing on Mac, the testsuite never exits with this patch
>>>>> applied. It just hangs after printing the result summary.
>>>>>
>>>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Dave,
>>>>>>
>>>>>> Please find the patch for OS compatability issue of
>>>>>> test-suite.
>>>>>>
>>>>>> *Code Changes:*
>>>>>>
>>>>>> 1. Minor code changes done related to os module in
>>>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>>>> *to handle path for SQL file.
>>>>>> 3. Code added to convert unicode to string in some .py
>>>>>> files.
>>>>>>
>>>>>> *Note:*
>>>>>> With python2.6.6 test-suite is failed to execute. I have
>>>>>> created the RM 2367 <https://redmine.postgresql.org/issues/2367;
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Navnath Gadakh
>>>>>>
>>>>>> EnterpriseDB Corporation
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent via pgadmin-hackers mailing list ([email protected]
>>>>>> )
>>>>>> To make changes to your subscription:
>>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Navnath Gadakh
>>>>
>>>> EnterpriseDB Corporation
>>>> The Enterprise PostgreSQL Company
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Regards,
Navnath Gadakh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[image/png] Screen Shot 2017-05-04 at 09.32.53.png (60.3K, 3-Screen%20Shot%202017-05-04%20at%2009.32.53.png)
download | view image
[application/octet-stream] testsuite_os_compatability_issue_v2.patch (7.3K, 4-testsuite_os_compatability_issue_v2.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index 5374b87..4ba5603 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -33,34 +33,37 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
def test_get_source_returns_a_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/9.1_plus/some_action.sql")
-
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_1_returns_9_1_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90100#/some_action.sql")
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_3_and_there_are_templates_for_9_2_and_9_1_returns_9_2_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.2_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90300#/some_action.sql")
- self.assertEqual("Some 9.2 SQL", content)
- self.assertIn("some_feature/sql/9.2_plus/some_action.sql", filename)
+ self.assertEqual("Some 9.2 SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_0_and_there_are_templates_for_9_1_and_9_2_returns_default_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "default", "some_action_with_default.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90000#/some_action_with_default.sql")
- self.assertEqual("Some default SQL", content)
- self.assertIn("some_feature/sql/default/some_action_with_default.sql", filename)
+ self.assertEqual("Some default SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_raise_not_found_exception_when_postgres_version_less_than_all_available_sql_templates(self):
diff --git a/web/regression/feature_utils/app_starter.py b/web/regression/feature_utils/app_starter.py
index b03f2a9..edfda05 100644
--- a/web/regression/feature_utils/app_starter.py
+++ b/web/regression/feature_utils/app_starter.py
@@ -7,7 +7,8 @@
#
##########################################################################
-import os
+from __future__ import print_function
+import os, sys
import subprocess
import signal
@@ -27,13 +28,11 @@ class AppStarter:
random_server_port = str(random.randint(10000, 65535))
env = {
"PGADMIN_PORT": random_server_port,
- "SQLITE_PATH": self.app_config.TEST_SQLITE_PATH
+ "SQLITE_PATH": str(self.app_config.TEST_SQLITE_PATH)
}
env.update(os.environ)
-
self.pgadmin_process = subprocess.Popen(["python", "pgAdmin4.py"],
shell=False,
- preexec_fn=os.setsid,
stderr=open(os.devnull, 'w'),
env=env)
@@ -42,5 +41,8 @@ class AppStarter:
self.driver.get("http://" + self.app_config.DEFAULT_SERVER + ":" + random_server_port)
def stop_app(self):
+ print("I am in stop_app() function.", file=sys.stderr)
self.driver.quit()
- os.killpg(os.getpgid(self.pgadmin_process.pid), signal.SIGTERM)
+ print("Quitting driver.", file=sys.stderr)
+ os.kill(self.pgadmin_process.pid, signal.SIGTERM)
+ print("pgAdmin4.py process killed.", file=sys.stderr)
diff --git a/web/regression/python_test_utils/test_utils.py b/web/regression/python_test_utils/test_utils.py
index 2b7c695..7cd0965 100644
--- a/web/regression/python_test_utils/test_utils.py
+++ b/web/regression/python_test_utils/test_utils.py
@@ -474,21 +474,25 @@ def _cleanup(tester, app_starter):
for database in test_databases:
connection = get_db_server(database["server_id"])
if connection:
+ print("Dropping databases.", file=sys.stderr)
drop_database(connection, database["db_name"])
# Delete table spaces
for tablespace in test_table_spaces:
connection = get_db_server(tablespace["server_id"])
if connection:
+ print("Dropping tablespaces.", file=sys.stderr)
regression.tablespace_utils.delete_tablespace(
connection, tablespace["tablespace_name"])
# Delete roles
for role in test_roles:
connection = get_db_server(role["server_id"])
if connection:
+ print("Dropping roles.", file=sys.stderr)
regression.roles_utils.delete_role(connection,
role["role_name"])
# Delete servers
for server in test_servers:
+ print("Deleting servers.", file=sys.stderr)
delete_server_with_api(tester, server["server_id"])
except Exception:
traceback.print_exc(file=sys.stderr)
@@ -498,6 +502,7 @@ def _cleanup(tester, app_starter):
# Remove SQLite db file
remove_db_file()
if app_starter:
+ print("Stopping app.", file=sys.stderr)
app_starter.stop_app()
diff --git a/web/regression/runtests.py b/web/regression/runtests.py
index 5f4a3d0..3ab7512 100644
--- a/web/regression/runtests.py
+++ b/web/regression/runtests.py
@@ -67,10 +67,10 @@ if pgadmin_credentials:
for item in ['login_username', 'login_password']):
pgadmin_credentials = pgadmin_credentials[
'pgAdmin4_login_credentials']
- os.environ['PGADMIN_SETUP_EMAIL'] = pgadmin_credentials[
- 'login_username']
- os.environ['PGADMIN_SETUP_PASSWORD'] = pgadmin_credentials[
- 'login_password']
+ os.environ['PGADMIN_SETUP_EMAIL'] = str(pgadmin_credentials[
+ 'login_username'])
+ os.environ['PGADMIN_SETUP_PASSWORD'] = str(pgadmin_credentials[
+ 'login_password'])
# Execute the setup file
exec (open("setup.py").read())
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-04 12:16 Dave Page <[email protected]>
parent: Navnath Gadakh <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Dave Page @ 2017-05-04 12:16 UTC (permalink / raw)
To: Navnath Gadakh <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>; Hamid Quddus <[email protected]>
Hi
Relevant console output is here, and the console log is attached. Again,
the pgAdmin4.py remained running (pid 39809). Killing it returned control
to the terminal.
Regression - PG 9.4:
144 tests passed
0 tests failed
12 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)
======================================================================
Please check output in file:
/Users/dpage/git/pgadmin4/web/regression/regression.log
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Deleting servers.
Stopping app.
I am in stop_app() function.
Quitting driver.
pgAdmin4.py process killed.
On Thu, May 4, 2017 at 12:53 PM, Navnath Gadakh <
[email protected]> wrote:
> Hi Dave,
>
> Please find the revised patch. I have added some print statements
> for debug purpose, so that I can get which line causing this issue. Most
> probably issue should be in the cleanup process.
>
> Please apply the patch and run the regression. Send me your console output
> and *regression.log* file
>
> Thanks!
>
>
>
>
>
>
> On Thu, May 4, 2017 at 2:18 PM, Dave Page <[email protected]> wrote:
>
>> I still see the issue. See the attached screenshot. Killing process 32287
>> caused the test suite to exit.[image: Inline image 1]
>>
>> On Wed, May 3, 2017 at 1:32 PM, Navnath Gadakh <
>> [email protected]> wrote:
>>
>>> It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
>>> to Sierra(10.12.4). I have applied the patch and it ran successfully
>>> without any hangup.
>>>
>>> This is my console output:
>>>
>>> *======================================================================*
>>>
>>> *Test Result Summary*
>>>
>>> *======================================================================*
>>>
>>> *REGRESSION TEST 1 PostgreSQL 9.6:*
>>>
>>> *140 tests passed*
>>>
>>> *0 test failed*
>>>
>>> *16 tests skipped:*
>>>
>>> *PackageAddTestCase (Fetch Package Node URL)*
>>>
>>> *PackageDeleteTestCase (Fetch Package Node URL)*
>>>
>>> *PackageGetTestCase (Fetch Package Node URL)*
>>>
>>> *PackagePutTestCase (Fetch Package Node URL)*
>>>
>>> *SynonymAddTestCase (Default Node URL)*
>>>
>>> *SynonymDeleteTestCase (Fetch synonym Node URL)*
>>>
>>> *SynonymGetTestCase (Fetch synonym Node URL)*
>>>
>>> *SynonymPutTestCase (Fetch synonym Node URL)*
>>>
>>> *ResourceGroupsAddTestCase (Add resource groups)*
>>>
>>> *ResourceGroupsDeleteTestCase (Delete resource groups)*
>>>
>>> *ResourceGroupsPutTestCase (Put resource groups)*
>>>
>>> *ResourceGroupsGetTestCase (Get resource groups)*
>>>
>>> *TableSpaceAddTestCase (Check Tablespace Node)*
>>>
>>> *TableSpaceDeleteTestCase (Check Tablespace Node)*
>>>
>>> *TablespaceGetTestCase (Check Tablespace Node)*
>>>
>>> *TableSpaceUpdateTestCase (Check Tablespace Node)*
>>>
>>> *======================================================================*
>>>
>>> *Please check output in file:
>>> /Users/edb/Navnath/pgadmin4/web/regression/regression.log*
>>>
>>> *(pgenv36) Laptop227-pn-in:regression Navnath$ *
>>>
>>>
>>>
>>> On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
>>>
>>>> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the
>>>> system Python installation. Packages are:
>>>>
>>>> (pgadmin4)piranha:~ dpage$ pip freeze
>>>> alabaster==0.7.10
>>>> alembic==0.9.1
>>>> args==0.1.0
>>>> Babel==1.3
>>>> beautifulsoup4==4.4.1
>>>> blinker==1.3
>>>> chromedriver-installer==0.0.6
>>>> click==6.6
>>>> clint==0.5.1
>>>> dateutils==0.6.6
>>>> docutils==0.13.1
>>>> extras==1.0.0
>>>> fixtures==3.0.0
>>>> Flask==0.11.1
>>>> Flask-Babel==0.11.1
>>>> Flask-Gravatar==0.4.2
>>>> Flask-HTMLmin==1.2
>>>> Flask-Login==0.3.2
>>>> Flask-Mail==0.9.1
>>>> Flask-Migrate==2.0.3
>>>> Flask-Principal==0.4.0
>>>> Flask-Script==2.0.5
>>>> Flask-Security==1.7.5
>>>> Flask-SQLAlchemy==2.1
>>>> Flask-WTF==0.12
>>>> html5lib==1.0b3
>>>> htmlmin==0.1.10
>>>> imagesize==0.7.1
>>>> importlib==1.0.3
>>>> itsdangerous==0.24
>>>> Jinja2==2.7.3
>>>> linecache2==1.0.0
>>>> Mako==1.0.6
>>>> MarkupSafe==0.23
>>>> minify==0.1.4
>>>> passlib==1.6.2
>>>> pbr==2.0.0
>>>> pkginfo==1.4.1
>>>> psycopg2==2.6.2
>>>> pycrypto==2.6.1
>>>> Pygments==2.2.0
>>>> pyperclip==1.5.27
>>>> pyrsistent==0.12.1
>>>> python-dateutil==2.5.0
>>>> python-editor==1.0.3
>>>> python-mimeparse==1.6.0
>>>> pytz==2014.10
>>>> requests==2.13.0
>>>> requests-toolbelt==0.7.1
>>>> selenium==3.3.1
>>>> simplejson==3.6.5
>>>> six==1.10.0
>>>> snowballstemmer==1.2.1
>>>> speaklater==1.3
>>>> Sphinx==1.5.3
>>>> SQLAlchemy==1.0.14
>>>> sqlparse==0.1.19
>>>> testscenarios==0.5.0
>>>> testtools==2.0.0
>>>> traceback2==1.4.0
>>>> unittest2==1.1.0
>>>> Werkzeug==0.9.6
>>>> WTForms==2.0.2
>>>>
>>>>
>>>> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> I have applied and run this patch on Mac and it ran
>>>>> successfully without hang up.
>>>>>
>>>>> I used different OS:
>>>>> OS X Yosemite Version 10.10.2
>>>>> OS X EI Capitan Version 10.11.6
>>>>>
>>>>> What is your system config?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> When testing on Mac, the testsuite never exits with this patch
>>>>>> applied. It just hangs after printing the result summary.
>>>>>>
>>>>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> Please find the patch for OS compatability issue of
>>>>>>> test-suite.
>>>>>>>
>>>>>>> *Code Changes:*
>>>>>>>
>>>>>>> 1. Minor code changes done related to os module in
>>>>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>>>>> *to handle path for SQL file.
>>>>>>> 3. Code added to convert unicode to string in some .py
>>>>>>> files.
>>>>>>>
>>>>>>> *Note:*
>>>>>>> With python2.6.6 test-suite is failed to execute. I
>>>>>>> have created the RM 2367
>>>>>>> <https://redmine.postgresql.org/issues/2367;
>>>>>>>
>>>>>>> Thank you!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Navnath Gadakh
>>>>>>>
>>>>>>> EnterpriseDB Corporation
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent via pgadmin-hackers mailing list ([email protected]
>>>>>>> g)
>>>>>>> To make changes to your subscription:
>>>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Navnath Gadakh
>>>>>
>>>>> EnterpriseDB Corporation
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Navnath Gadakh
>>>
>>> EnterpriseDB Corporation
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[image/png] Screen Shot 2017-05-04 at 09.32.53.png (60.3K, 3-Screen%20Shot%202017-05-04%20at%2009.32.53.png)
download | view image
[application/zip] regression.log.zip (214.8K, 4-regression.log.zip)
download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-05 10:35 Navnath Gadakh <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 1 reply; 10+ messages in thread
From: Navnath Gadakh @ 2017-05-05 10:35 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>; Hamid Quddus <[email protected]>
Hi Dave,
Please find the revised patch with some code changes related OS
module used in feature tests for starting and stoping the app. There are
some functions of of OS module not supported in windows and unix/mac I have
applied some checked in the code.
Hope this will successfully run on your machine. :)
Thank you.
On Thu, May 4, 2017 at 5:46 PM, Dave Page <[email protected]> wrote:
> Hi
>
> Relevant console output is here, and the console log is attached. Again,
> the pgAdmin4.py remained running (pid 39809). Killing it returned control
> to the terminal.
>
> Regression - PG 9.4:
>
> 144 tests passed
> 0 tests failed
> 12 tests skipped:
> SynonymGetTestCase (Fetch synonym Node URL)
> PackageDeleteTestCase (Fetch Package Node URL)
> ResourceGroupsGetTestCase (Get resource groups)
> SynonymDeleteTestCase (Fetch synonym Node URL)
> ResourceGroupsAddTestCase (Add resource groups)
> PackagePutTestCase (Fetch Package Node URL)
> SynonymPutTestCase (Fetch synonym Node URL)
> ResourceGroupsPutTestCase (Put resource groups)
> ResourceGroupsDeleteTestCase (Delete resource groups)
> SynonymAddTestCase (Default Node URL)
> PackageAddTestCase (Fetch Package Node URL)
> PackageGetTestCase (Fetch Package Node URL)
>
> ======================================================================
>
> Please check output in file: /Users/dpage/git/pgadmin4/web/
> regression/regression.log
>
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Deleting servers.
> Stopping app.
> I am in stop_app() function.
> Quitting driver.
> pgAdmin4.py process killed.
>
> On Thu, May 4, 2017 at 12:53 PM, Navnath Gadakh <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>> Please find the revised patch. I have added some print statements
>> for debug purpose, so that I can get which line causing this issue. Most
>> probably issue should be in the cleanup process.
>>
>> Please apply the patch and run the regression. Send me your console
>> output and *regression.log* file
>>
>> Thanks!
>>
>>
>>
>>
>>
>>
>> On Thu, May 4, 2017 at 2:18 PM, Dave Page <[email protected]> wrote:
>>
>>> I still see the issue. See the attached screenshot. Killing process
>>> 32287 caused the test suite to exit.[image: Inline image 1]
>>>
>>> On Wed, May 3, 2017 at 1:32 PM, Navnath Gadakh <
>>> [email protected]> wrote:
>>>
>>>> It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
>>>> to Sierra(10.12.4). I have applied the patch and it ran successfully
>>>> without any hangup.
>>>>
>>>> This is my console output:
>>>>
>>>> *======================================================================*
>>>>
>>>> *Test Result Summary*
>>>>
>>>> *======================================================================*
>>>>
>>>> *REGRESSION TEST 1 PostgreSQL 9.6:*
>>>>
>>>> *140 tests passed*
>>>>
>>>> *0 test failed*
>>>>
>>>> *16 tests skipped:*
>>>>
>>>> *PackageAddTestCase (Fetch Package Node URL)*
>>>>
>>>> *PackageDeleteTestCase (Fetch Package Node URL)*
>>>>
>>>> *PackageGetTestCase (Fetch Package Node URL)*
>>>>
>>>> *PackagePutTestCase (Fetch Package Node URL)*
>>>>
>>>> *SynonymAddTestCase (Default Node URL)*
>>>>
>>>> *SynonymDeleteTestCase (Fetch synonym Node URL)*
>>>>
>>>> *SynonymGetTestCase (Fetch synonym Node URL)*
>>>>
>>>> *SynonymPutTestCase (Fetch synonym Node URL)*
>>>>
>>>> *ResourceGroupsAddTestCase (Add resource groups)*
>>>>
>>>> *ResourceGroupsDeleteTestCase (Delete resource groups)*
>>>>
>>>> *ResourceGroupsPutTestCase (Put resource groups)*
>>>>
>>>> *ResourceGroupsGetTestCase (Get resource groups)*
>>>>
>>>> *TableSpaceAddTestCase (Check Tablespace Node)*
>>>>
>>>> *TableSpaceDeleteTestCase (Check Tablespace Node)*
>>>>
>>>> *TablespaceGetTestCase (Check Tablespace Node)*
>>>>
>>>> *TableSpaceUpdateTestCase (Check Tablespace Node)*
>>>>
>>>> *======================================================================*
>>>>
>>>> *Please check output in file:
>>>> /Users/edb/Navnath/pgadmin4/web/regression/regression.log*
>>>>
>>>> *(pgenv36) Laptop227-pn-in:regression Navnath$ *
>>>>
>>>>
>>>>
>>>> On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the
>>>>> system Python installation. Packages are:
>>>>>
>>>>> (pgadmin4)piranha:~ dpage$ pip freeze
>>>>> alabaster==0.7.10
>>>>> alembic==0.9.1
>>>>> args==0.1.0
>>>>> Babel==1.3
>>>>> beautifulsoup4==4.4.1
>>>>> blinker==1.3
>>>>> chromedriver-installer==0.0.6
>>>>> click==6.6
>>>>> clint==0.5.1
>>>>> dateutils==0.6.6
>>>>> docutils==0.13.1
>>>>> extras==1.0.0
>>>>> fixtures==3.0.0
>>>>> Flask==0.11.1
>>>>> Flask-Babel==0.11.1
>>>>> Flask-Gravatar==0.4.2
>>>>> Flask-HTMLmin==1.2
>>>>> Flask-Login==0.3.2
>>>>> Flask-Mail==0.9.1
>>>>> Flask-Migrate==2.0.3
>>>>> Flask-Principal==0.4.0
>>>>> Flask-Script==2.0.5
>>>>> Flask-Security==1.7.5
>>>>> Flask-SQLAlchemy==2.1
>>>>> Flask-WTF==0.12
>>>>> html5lib==1.0b3
>>>>> htmlmin==0.1.10
>>>>> imagesize==0.7.1
>>>>> importlib==1.0.3
>>>>> itsdangerous==0.24
>>>>> Jinja2==2.7.3
>>>>> linecache2==1.0.0
>>>>> Mako==1.0.6
>>>>> MarkupSafe==0.23
>>>>> minify==0.1.4
>>>>> passlib==1.6.2
>>>>> pbr==2.0.0
>>>>> pkginfo==1.4.1
>>>>> psycopg2==2.6.2
>>>>> pycrypto==2.6.1
>>>>> Pygments==2.2.0
>>>>> pyperclip==1.5.27
>>>>> pyrsistent==0.12.1
>>>>> python-dateutil==2.5.0
>>>>> python-editor==1.0.3
>>>>> python-mimeparse==1.6.0
>>>>> pytz==2014.10
>>>>> requests==2.13.0
>>>>> requests-toolbelt==0.7.1
>>>>> selenium==3.3.1
>>>>> simplejson==3.6.5
>>>>> six==1.10.0
>>>>> snowballstemmer==1.2.1
>>>>> speaklater==1.3
>>>>> Sphinx==1.5.3
>>>>> SQLAlchemy==1.0.14
>>>>> sqlparse==0.1.19
>>>>> testscenarios==0.5.0
>>>>> testtools==2.0.0
>>>>> traceback2==1.4.0
>>>>> unittest2==1.1.0
>>>>> Werkzeug==0.9.6
>>>>> WTForms==2.0.2
>>>>>
>>>>>
>>>>> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Dave,
>>>>>>
>>>>>> I have applied and run this patch on Mac and it ran
>>>>>> successfully without hang up.
>>>>>>
>>>>>> I used different OS:
>>>>>> OS X Yosemite Version 10.10.2
>>>>>> OS X EI Capitan Version 10.11.6
>>>>>>
>>>>>> What is your system config?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> When testing on Mac, the testsuite never exits with this patch
>>>>>>> applied. It just hangs after printing the result summary.
>>>>>>>
>>>>>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> Please find the patch for OS compatability issue of
>>>>>>>> test-suite.
>>>>>>>>
>>>>>>>> *Code Changes:*
>>>>>>>>
>>>>>>>> 1. Minor code changes done related to os module in
>>>>>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>>>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>>>>>> *to handle path for SQL file.
>>>>>>>> 3. Code added to convert unicode to string in some .py
>>>>>>>> files.
>>>>>>>>
>>>>>>>> *Note:*
>>>>>>>> With python2.6.6 test-suite is failed to execute. I
>>>>>>>> have created the RM 2367
>>>>>>>> <https://redmine.postgresql.org/issues/2367;
>>>>>>>>
>>>>>>>> Thank you!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>> Navnath Gadakh
>>>>>>>>
>>>>>>>> EnterpriseDB Corporation
>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent via pgadmin-hackers mailing list (
>>>>>>>> [email protected])
>>>>>>>> To make changes to your subscription:
>>>>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Navnath Gadakh
>>>>>>
>>>>>> EnterpriseDB Corporation
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Navnath Gadakh
>>>>
>>>> EnterpriseDB Corporation
>>>> The Enterprise PostgreSQL Company
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Regards,
>> Navnath Gadakh
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Regards,
Navnath Gadakh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[image/png] Screen Shot 2017-05-04 at 09.32.53.png (60.3K, 3-Screen%20Shot%202017-05-04%20at%2009.32.53.png)
download | view image
[application/octet-stream] testsuite_os_compatability_issue_v3.patch (6.7K, 4-testsuite_os_compatability_issue_v3.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index 5374b87..4ba5603 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -33,34 +33,37 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
def test_get_source_returns_a_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/9.1_plus/some_action.sql")
-
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_1_returns_9_1_template(self):
expected_content = "Some SQL" \
"\nsome more stuff on a new line\n"
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.1_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90100#/some_action.sql")
- self.assertEqual(expected_content, content)
- self.assertIn("some_feature/sql/9.1_plus/some_action.sql", filename)
+ self.assertEqual(expected_content, str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_3_and_there_are_templates_for_9_2_and_9_1_returns_9_2_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "9.2_plus", "some_action.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90300#/some_action.sql")
- self.assertEqual("Some 9.2 SQL", content)
- self.assertIn("some_feature/sql/9.2_plus/some_action.sql", filename)
+ self.assertEqual("Some 9.2 SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_get_source_when_the_version_is_9_0_and_there_are_templates_for_9_1_and_9_2_returns_default_template(self):
-
+ # For cross platform we join the SQL path (This solves the slashes issue)
+ sql_path = os.path.join("some_feature", "sql", "default", "some_action_with_default.sql")
content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90000#/some_action_with_default.sql")
- self.assertEqual("Some default SQL", content)
- self.assertIn("some_feature/sql/default/some_action_with_default.sql", filename)
+ self.assertEqual("Some default SQL", str(content).replace("\r",""))
+ self.assertIn(sql_path, filename)
def test_raise_not_found_exception_when_postgres_version_less_than_all_available_sql_templates(self):
diff --git a/web/regression/feature_utils/app_starter.py b/web/regression/feature_utils/app_starter.py
index b03f2a9..96cc516 100644
--- a/web/regression/feature_utils/app_starter.py
+++ b/web/regression/feature_utils/app_starter.py
@@ -6,17 +6,15 @@
# This software is released under the PostgreSQL Licence
#
##########################################################################
-
import os
import subprocess
-
import signal
-
import random
+
class AppStarter:
- """
- Helper for starting the full pgadmin4 app and loading the page via selenium
+ """ Helper for starting the full pgadmin4 app and loading the page via
+ selenium
"""
def __init__(self, driver, app_config):
@@ -24,23 +22,35 @@ class AppStarter:
self.app_config = app_config
def start_app(self):
+ """ This function start the subprocess to start pgAdmin app """
random_server_port = str(random.randint(10000, 65535))
env = {
"PGADMIN_PORT": random_server_port,
- "SQLITE_PATH": self.app_config.TEST_SQLITE_PATH
- }
+ "SQLITE_PATH": str(self.app_config.TEST_SQLITE_PATH)
+ }
env.update(os.environ)
- self.pgadmin_process = subprocess.Popen(["python", "pgAdmin4.py"],
- shell=False,
- preexec_fn=os.setsid,
- stderr=open(os.devnull, 'w'),
- env=env)
+ # Add OS check for pass value for 'preexec_fn'
+ self.pgadmin_process = subprocess.Popen(
+ ["python", "pgAdmin4.py"],
+ shell=False,
+ preexec_fn=None if os.name == 'nt' else os.setsid,
+ stderr=open(os.devnull, 'w'),
+ env=env
+ )
self.driver.set_window_size(1024, 1024)
- print("opening browser")
- self.driver.get("http://" + self.app_config.DEFAULT_SERVER + ":" + random_server_port)
+ self.driver.get(
+ "http://" + self.app_config.DEFAULT_SERVER + ":" +
+ random_server_port)
def stop_app(self):
+ """ This function stop the started app by killing process """
self.driver.quit()
- os.killpg(os.getpgid(self.pgadmin_process.pid), signal.SIGTERM)
+ # os.killpg supported in Mac and Unix as this function not supported in
+ # Windows
+ try:
+ os.killpg(os.getpgid(self.pgadmin_process.pid), signal.SIGTERM)
+ except AttributeError:
+ # os.kill is supported by Windows
+ os.kill(self.pgadmin_process.pid, signal.SIGTERM)
diff --git a/web/regression/runtests.py b/web/regression/runtests.py
index 5f4a3d0..3ab7512 100644
--- a/web/regression/runtests.py
+++ b/web/regression/runtests.py
@@ -67,10 +67,10 @@ if pgadmin_credentials:
for item in ['login_username', 'login_password']):
pgadmin_credentials = pgadmin_credentials[
'pgAdmin4_login_credentials']
- os.environ['PGADMIN_SETUP_EMAIL'] = pgadmin_credentials[
- 'login_username']
- os.environ['PGADMIN_SETUP_PASSWORD'] = pgadmin_credentials[
- 'login_password']
+ os.environ['PGADMIN_SETUP_EMAIL'] = str(pgadmin_credentials[
+ 'login_username'])
+ os.environ['PGADMIN_SETUP_PASSWORD'] = str(pgadmin_credentials[
+ 'login_password'])
# Execute the setup file
exec (open("setup.py").read())
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgAdmin4: Test-suite OS compatability issue
@ 2017-05-08 08:26 Dave Page <[email protected]>
parent: Navnath Gadakh <[email protected]>
0 siblings, 0 replies; 10+ messages in thread
From: Dave Page @ 2017-05-08 08:26 UTC (permalink / raw)
To: Navnath Gadakh <[email protected]>; +Cc: pgadmin-hackers; Kanchan Mohitey <[email protected]>; Ikram Khan <[email protected]>; Hamid Quddus <[email protected]>
That seems better - committed, thanks!
On Fri, May 5, 2017 at 11:35 AM, Navnath Gadakh <
[email protected]> wrote:
> Hi Dave,
>
> Please find the revised patch with some code changes related OS
> module used in feature tests for starting and stoping the app. There are
> some functions of of OS module not supported in windows and unix/mac I have
> applied some checked in the code.
>
> Hope this will successfully run on your machine. :)
>
> Thank you.
>
>
>
>
> On Thu, May 4, 2017 at 5:46 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> Relevant console output is here, and the console log is attached. Again,
>> the pgAdmin4.py remained running (pid 39809). Killing it returned control
>> to the terminal.
>>
>> Regression - PG 9.4:
>>
>> 144 tests passed
>> 0 tests failed
>> 12 tests skipped:
>> SynonymGetTestCase (Fetch synonym Node URL)
>> PackageDeleteTestCase (Fetch Package Node URL)
>> ResourceGroupsGetTestCase (Get resource groups)
>> SynonymDeleteTestCase (Fetch synonym Node URL)
>> ResourceGroupsAddTestCase (Add resource groups)
>> PackagePutTestCase (Fetch Package Node URL)
>> SynonymPutTestCase (Fetch synonym Node URL)
>> ResourceGroupsPutTestCase (Put resource groups)
>> ResourceGroupsDeleteTestCase (Delete resource groups)
>> SynonymAddTestCase (Default Node URL)
>> PackageAddTestCase (Fetch Package Node URL)
>> PackageGetTestCase (Fetch Package Node URL)
>>
>> ======================================================================
>>
>> Please check output in file: /Users/dpage/git/pgadmin4/web/
>> regression/regression.log
>>
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Deleting servers.
>> Stopping app.
>> I am in stop_app() function.
>> Quitting driver.
>> pgAdmin4.py process killed.
>>
>> On Thu, May 4, 2017 at 12:53 PM, Navnath Gadakh <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find the revised patch. I have added some print
>>> statements for debug purpose, so that I can get which line causing this
>>> issue. Most probably issue should be in the cleanup process.
>>>
>>> Please apply the patch and run the regression. Send me your console
>>> output and *regression.log* file
>>>
>>> Thanks!
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, May 4, 2017 at 2:18 PM, Dave Page <[email protected]> wrote:
>>>
>>>> I still see the issue. See the attached screenshot. Killing process
>>>> 32287 caused the test suite to exit.[image: Inline image 1]
>>>>
>>>> On Wed, May 3, 2017 at 1:32 PM, Navnath Gadakh <
>>>> [email protected]> wrote:
>>>>
>>>>> It's getting strange now. I just updated my Mac OS from EI Capitan(10.11.6)
>>>>> to Sierra(10.12.4). I have applied the patch and it ran successfully
>>>>> without any hangup.
>>>>>
>>>>> This is my console output:
>>>>>
>>>>>
>>>>> *======================================================================*
>>>>>
>>>>> *Test Result Summary*
>>>>>
>>>>>
>>>>> *======================================================================*
>>>>>
>>>>> *REGRESSION TEST 1 PostgreSQL 9.6:*
>>>>>
>>>>> *140 tests passed*
>>>>>
>>>>> *0 test failed*
>>>>>
>>>>> *16 tests skipped:*
>>>>>
>>>>> *PackageAddTestCase (Fetch Package Node URL)*
>>>>>
>>>>> *PackageDeleteTestCase (Fetch Package Node URL)*
>>>>>
>>>>> *PackageGetTestCase (Fetch Package Node URL)*
>>>>>
>>>>> *PackagePutTestCase (Fetch Package Node URL)*
>>>>>
>>>>> *SynonymAddTestCase (Default Node URL)*
>>>>>
>>>>> *SynonymDeleteTestCase (Fetch synonym Node URL)*
>>>>>
>>>>> *SynonymGetTestCase (Fetch synonym Node URL)*
>>>>>
>>>>> *SynonymPutTestCase (Fetch synonym Node URL)*
>>>>>
>>>>> *ResourceGroupsAddTestCase (Add resource groups)*
>>>>>
>>>>> *ResourceGroupsDeleteTestCase (Delete resource groups)*
>>>>>
>>>>> *ResourceGroupsPutTestCase (Put resource groups)*
>>>>>
>>>>> *ResourceGroupsGetTestCase (Get resource groups)*
>>>>>
>>>>> *TableSpaceAddTestCase (Check Tablespace Node)*
>>>>>
>>>>> *TableSpaceDeleteTestCase (Check Tablespace Node)*
>>>>>
>>>>> *TablespaceGetTestCase (Check Tablespace Node)*
>>>>>
>>>>> *TableSpaceUpdateTestCase (Check Tablespace Node)*
>>>>>
>>>>>
>>>>> *======================================================================*
>>>>>
>>>>> *Please check output in file:
>>>>> /Users/edb/Navnath/pgadmin4/web/regression/regression.log*
>>>>>
>>>>> *(pgenv36) Laptop227-pn-in:regression Navnath$ *
>>>>>
>>>>>
>>>>>
>>>>> On Wed, May 3, 2017 at 1:39 PM, Dave Page <[email protected]> wrote:
>>>>>
>>>>>> 10.12.3 (Sierra), 16GB MBP. Running in a virtualenv built from the
>>>>>> system Python installation. Packages are:
>>>>>>
>>>>>> (pgadmin4)piranha:~ dpage$ pip freeze
>>>>>> alabaster==0.7.10
>>>>>> alembic==0.9.1
>>>>>> args==0.1.0
>>>>>> Babel==1.3
>>>>>> beautifulsoup4==4.4.1
>>>>>> blinker==1.3
>>>>>> chromedriver-installer==0.0.6
>>>>>> click==6.6
>>>>>> clint==0.5.1
>>>>>> dateutils==0.6.6
>>>>>> docutils==0.13.1
>>>>>> extras==1.0.0
>>>>>> fixtures==3.0.0
>>>>>> Flask==0.11.1
>>>>>> Flask-Babel==0.11.1
>>>>>> Flask-Gravatar==0.4.2
>>>>>> Flask-HTMLmin==1.2
>>>>>> Flask-Login==0.3.2
>>>>>> Flask-Mail==0.9.1
>>>>>> Flask-Migrate==2.0.3
>>>>>> Flask-Principal==0.4.0
>>>>>> Flask-Script==2.0.5
>>>>>> Flask-Security==1.7.5
>>>>>> Flask-SQLAlchemy==2.1
>>>>>> Flask-WTF==0.12
>>>>>> html5lib==1.0b3
>>>>>> htmlmin==0.1.10
>>>>>> imagesize==0.7.1
>>>>>> importlib==1.0.3
>>>>>> itsdangerous==0.24
>>>>>> Jinja2==2.7.3
>>>>>> linecache2==1.0.0
>>>>>> Mako==1.0.6
>>>>>> MarkupSafe==0.23
>>>>>> minify==0.1.4
>>>>>> passlib==1.6.2
>>>>>> pbr==2.0.0
>>>>>> pkginfo==1.4.1
>>>>>> psycopg2==2.6.2
>>>>>> pycrypto==2.6.1
>>>>>> Pygments==2.2.0
>>>>>> pyperclip==1.5.27
>>>>>> pyrsistent==0.12.1
>>>>>> python-dateutil==2.5.0
>>>>>> python-editor==1.0.3
>>>>>> python-mimeparse==1.6.0
>>>>>> pytz==2014.10
>>>>>> requests==2.13.0
>>>>>> requests-toolbelt==0.7.1
>>>>>> selenium==3.3.1
>>>>>> simplejson==3.6.5
>>>>>> six==1.10.0
>>>>>> snowballstemmer==1.2.1
>>>>>> speaklater==1.3
>>>>>> Sphinx==1.5.3
>>>>>> SQLAlchemy==1.0.14
>>>>>> sqlparse==0.1.19
>>>>>> testscenarios==0.5.0
>>>>>> testtools==2.0.0
>>>>>> traceback2==1.4.0
>>>>>> unittest2==1.1.0
>>>>>> Werkzeug==0.9.6
>>>>>> WTForms==2.0.2
>>>>>>
>>>>>>
>>>>>> On Wed, May 3, 2017 at 7:13 AM, Navnath Gadakh <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> I have applied and run this patch on Mac and it ran
>>>>>>> successfully without hang up.
>>>>>>>
>>>>>>> I used different OS:
>>>>>>> OS X Yosemite Version 10.10.2
>>>>>>> OS X EI Capitan Version 10.11.6
>>>>>>>
>>>>>>> What is your system config?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, May 2, 2017 at 4:39 PM, Dave Page <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> When testing on Mac, the testsuite never exits with this patch
>>>>>>>> applied. It just hangs after printing the result summary.
>>>>>>>>
>>>>>>>> On Fri, Apr 28, 2017 at 2:51 PM, Navnath Gadakh <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Dave,
>>>>>>>>>
>>>>>>>>> Please find the patch for OS compatability issue of
>>>>>>>>> test-suite.
>>>>>>>>>
>>>>>>>>> *Code Changes:*
>>>>>>>>>
>>>>>>>>> 1. Minor code changes done related to os module in
>>>>>>>>> *pgadmin4/web/regression/feature_utils/app_starter.py*
>>>>>>>>> 2. Code added in pgadmin4/*web/pgadmin/utils/tests/test_versioned_template_loader.py
>>>>>>>>> *to handle path for SQL file.
>>>>>>>>> 3. Code added to convert unicode to string in some .py
>>>>>>>>> files.
>>>>>>>>>
>>>>>>>>> *Note:*
>>>>>>>>> With python2.6.6 test-suite is failed to execute. I
>>>>>>>>> have created the RM 2367
>>>>>>>>> <https://redmine.postgresql.org/issues/2367;
>>>>>>>>>
>>>>>>>>> Thank you!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> Navnath Gadakh
>>>>>>>>>
>>>>>>>>> EnterpriseDB Corporation
>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent via pgadmin-hackers mailing list (
>>>>>>>>> [email protected])
>>>>>>>>> To make changes to your subscription:
>>>>>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dave Page
>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>> Twitter: @pgsnake
>>>>>>>>
>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Navnath Gadakh
>>>>>>>
>>>>>>> EnterpriseDB Corporation
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Navnath Gadakh
>>>>>
>>>>> EnterpriseDB Corporation
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Navnath Gadakh
>>>
>>> EnterpriseDB Corporation
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[image/png] Screen Shot 2017-05-04 at 09.32.53.png (60.3K, 3-Screen%20Shot%202017-05-04%20at%2009.32.53.png)
download | view image
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2017-05-08 08:26 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 13:51 pgAdmin4: Test-suite OS compatability issue Navnath Gadakh <[email protected]>
2017-05-02 11:09 ` Dave Page <[email protected]>
2017-05-03 06:13 ` Navnath Gadakh <[email protected]>
2017-05-03 08:09 ` Dave Page <[email protected]>
2017-05-03 12:32 ` Navnath Gadakh <[email protected]>
2017-05-04 08:48 ` Dave Page <[email protected]>
2017-05-04 11:53 ` Navnath Gadakh <[email protected]>
2017-05-04 12:16 ` Dave Page <[email protected]>
2017-05-05 10:35 ` Navnath Gadakh <[email protected]>
2017-05-08 08:26 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox