Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEM1k-0003lL-09 for pgadmin-hackers@arkaria.postgresql.org; Fri, 26 May 2017 20:40:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dEM1j-0003Uo-Bi for pgadmin-hackers@arkaria.postgresql.org; Fri, 26 May 2017 20:40:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dEM1i-0003UQ-6u for pgadmin-hackers@postgresql.org; Fri, 26 May 2017 20:40:02 +0000 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dEM1a-0008To-Mm for pgadmin-hackers@postgresql.org; Fri, 26 May 2017 20:40:01 +0000 Received: by mail-io0-x22b.google.com with SMTP id k91so16106942ioi.1 for ; Fri, 26 May 2017 13:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PTiJtWyORSrSyAhhiTU2fNX2Kfea/B9RjMHa2CX4VtA=; b=We+tlJy2L3rRZKzcnVdQBXZpK3aWmQZCLBBuogS/WjJtlNPmVNQSfcjOzRdtP2imP7 MLAjUAjj2u0LSxpuJFaEAh8V7Y0xLkmJCbsnls6UZ48dBJKgJ6rosIsa3IYY0tl81CjI Pe8LG+jIMw4hlYfOxbQjX9OLI506FePWVMVpG+f9zXgSIuJaBUeFQNcNGUPG/JVYGxBo 4MSiTRml9Siq8SKxFtTEeDMuvHoJ+PR0iOwQybdxpNrXJ4x12LZF8ylhmoC9cu1PuP/L h+7t0XIJjZmCV/mZC1eyX9iWWQVuVur0Q7MNLAuN5cSbv/BVTJ5wazjwUOdv6QFIOY4S XDaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PTiJtWyORSrSyAhhiTU2fNX2Kfea/B9RjMHa2CX4VtA=; b=rMQy/bPgxy+eAkHoMdVTqLweqQDB3uR/QJaIWkUR1H4mGTdhi3Rqh5TOWDBOHZHMIx 6YmCqvk2O99q5vs+eQ05VdFDo7wKwMxGemDp/pEn1Q1BMxZS9Dm3IocaQzLESRgQlwvW wnUxsSwUmn6g5NqmLYctv8CuwjHVpUgmpkCXHpNM4Zs3PSnS3hbM2wJs9RRh73fEJjxe Q9IV4eRc/oLp6wFn4MjGIxQF8z0j9cUU7jNO5c0Et0+frCg+FrmWjgyyzJo6uCRm/moL sKi8lNAxFij7AOJ9n8LO+3yXDhjU4jPQS++cGKWMnrqxEc7mQA8VV9bmlD5tBISdxeiO Lmrg== X-Gm-Message-State: AODbwcCSUTrsUmibapy2ncWXgoehx8IwxxjkDb4rVUces67rSeL0Ms+9 2dt+NxU7LbUSpiUoMnp2wmsCUwy4Yxbr X-Received: by 10.107.3.165 with SMTP id e37mr3792778ioi.232.1495831193762; Fri, 26 May 2017 13:39:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.147 with HTTP; Fri, 26 May 2017 13:39:52 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 26 May 2017 16:39:52 -0400 Message-ID: Subject: Re: [pgAdmin4] [PATCH] History Tab rewrite in React To: Joao Pedro De Almeida Pereira Cc: Matthew Kleiman , Murtuza Zabuawala , pgadmin-hackers Content-Type: text/plain; charset="UTF-8" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi That fixed the JS tests, however, the feature tests are completely broken now - the browser fails to load the app, so they just timeout: ====================================================================== ERROR: runTest (pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest) Test database connection ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest) Test Copying Query Results ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest) Test checks for PG data-types output ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest) Tests the path through the query tool ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest) Test table DDL generation ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest) Test XSS check for panels and query tool ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ====================================================================== ERROR: runTest (pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest) Tests to check if Debugger is vulnerable to XSS ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 36, in setUp self.page.wait_for_app() File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 187, in wait_for_app self._wait_for("app to start", page_shows_app) File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 191, in _wait_for "Timed out waiting for " + waiting_for_message) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) TimeoutException: Message: Timed out waiting for app to start ---------------------------------------------------------------------- Ran 166 tests in 113.200s FAILED (errors=7, skipped=16) =============Running the test cases for 'PostgreSQL 9.6'============= runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase) Check Cast Node ... 2017-05-26 16:27:56,754: ERROR pgadmin: 'Mock' object does not support item assignment Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 774, in connect server_types=ServerType.types() File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 309, in connect os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id) TypeError: 'Mock' object does not support item assignment FAIL ERROR runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase) Check Cast Node ... 2017-05-26 16:27:56,840: ERROR pgadmin: 'Mock' object does not support item assignment Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 774, in connect server_types=ServerType.types() File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 309, in connect os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id) TypeError: 'Mock' object does not support item assignment FAIL ERROR runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase) Check Cast Node ... Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/tests/utils.py", line 51, in create_cast " FUNCTION AS IMPLICIT" % (source_type, target_type)) ProgrammingError: cast from type money to type bigint already exists 2017-05-26 16:27:56,960: ERROR pgadmin: 'Mock' object does not support item assignment Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 774, in connect server_types=ServerType.types() File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 309, in connect os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id) TypeError: 'Mock' object does not support item assignment FAIL ERROR runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase) Check Cast Node ... 2017-05-26 16:27:57,060: ERROR pgadmin: 'Mock' object does not support item assignment Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 774, in connect server_types=ServerType.types() File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py", line 309, in connect os.environ['PGAPPNAME'] = '{0} - {1}'.format(config.APP_NAME, conn_id) TypeError: 'Mock' object does not support item assignment FAIL ERROR On Wed, May 24, 2017 at 10:22 AM, Joao Pedro De Almeida Pereira wrote: > Hi Hackers! > > Please find attached the two patches, now including a new grunt task to run > the tests only once that can be used in CI. For development, use grunt > test, for ci or to run tests only once, use grunt test-ci. This is > documented in the README file. > > Also note, these patches were generated using git diff as per > https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html. Sorry for > any inconvenience from generating a patch in an alternate manner earlier. > > Thanks, > Joao & Matt > > On Wed, May 24, 2017 at 9:36 AM, Matthew Kleiman > wrote: >> >> Hi Dave, >> >> This one is our bad! We didn't create a grunt task to run the tests only >> once, as you would in CI. grunt tests currently runs the tests and continues >> to watch for changes, running the tests again each time the source code is >> modified. We will create a task that is suitable to run in CI. >> >> In the meantime, if you have any free time during the day today and would >> like to schedule a sync call with us, that would help us to tighten the >> feedback loop. >> >> Thanks, >> Joao & Matt >> >> On Tue, May 23, 2017 at 4:44 PM, Dave Page wrote: >>> >>> On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira >>> wrote: >>> > Okay >>> > >>> > Can you try removing web/node_modules and web/yarn.lock, and running >>> > $ yarn install >>> > $ grunt tests >>> > >>> > We think this might be due to a bad version of phantomjs-prebuilt. >>> > >>> > If that still fails, can you try running grunt as "yarn run grunt >>> > tests"? >>> >>> I'm on a different machine now, and here grunt just seems to never >>> exit when it's doing anything. For example, I ran this a few minutes >>> ago, it finished in seconds and has been sitting here ever since: >>> >>> (pgadmin4)snake:web dpage$ grunt tests >>> Running "eslint:target" (eslint) task >>> >>> Running "karma:unit" (karma) task >>> >>> webpack: Compiled successfully. >>> webpack: Compiling... >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> webpack: wait until bundle finished: >>> (node:4902) DeprecationWarning: loaderUtils.parseQuery() received a >>> non-string value which can be problematic, see >>> https://github.com/webpack/loader-utils/issues/56 >>> parseQuery() will be replaced with getOptions() in the next major >>> version of loader-utils. >>> 23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open >>> http://localhost:9876/ >>> >>> webpack: Compiled successfully. >>> PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1) >>> SUCCESS (1.353 secs / 1.328 secs) >>> >>> I'm quite unimpressed with it so far :-( >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> 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 (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers