Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYZcl-0003c8-Jv for pgadmin-hackers@arkaria.postgresql.org; Tue, 31 Jan 2017 14:41:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cYZck-0005pg-VY for pgadmin-hackers@arkaria.postgresql.org; Tue, 31 Jan 2017 14:41:35 +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 1cYZcV-0005b1-U2 for pgadmin-hackers@postgresql.org; Tue, 31 Jan 2017 14:41:20 +0000 Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cYZcN-0003Gf-FU for pgadmin-hackers@postgresql.org; Tue, 31 Jan 2017 14:41:17 +0000 Received: by mail-it0-x22d.google.com with SMTP id 203so217943341ith.0 for ; Tue, 31 Jan 2017 06:41:11 -0800 (PST) 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=eZOB9IWSKZGd+X7N/AeQoAY9PZEdrv/XW2wcNT1B5Og=; b=vs5+z7O2w50UEqZttUxuPLBZTR2/Yysg3ygxdTbQhTXD0kuwHqxjoybDH5VejWKSNO Gh0LvuApQ+zOtJGsfE/CKA8ZQwMU7/XxSDBC6goCJoCgOtPvtnFb8lmGh1HuQxMUEP6i ODUTtD9enWOPRMnj8UzzGxoKN0sPgHIyF+CFHehxyWRW/yIH4apSaCknkCtgRBM+zMI4 occDcAA5wYin1sX97Z76H/HrNuFfAfBpjv/GEtdYgGkBl/bQt/9IJFNqyP/lqfvD0T/4 XbxM9IgIScar/MpHs8mLc97BlUQJGFYKWgPRJm0UGoWE/JGtE0/bxsUVmTX1xeuI0mlR fYDg== 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=eZOB9IWSKZGd+X7N/AeQoAY9PZEdrv/XW2wcNT1B5Og=; b=gqVjqSQxdzBNU+6GjgIRl3LQhO78mGy0Xlk+N3lTSi9sebD9t48Vosq0ZTHdQ4hq0G o2QMg1J3lCZEo9qhk5Haz81V7cRZeQ3Qf8wgJHCZItICpwiWD1zf0MyOQYNbu1Ka1g4o rwFkwfWYH26JHHjLEuw9KDQqrkrsiQ9VNR7ese3qtZMVcpW0WZBEDg6wNKGX3XJBJTdq Y+CWpH6XKxe9meR6D2xB60NhHDDk1S7JLd1zio4mvQCjZPtAOPsR4hZ34Le3PwjZGtjN jURedvzC/N0D99pkEJt7pEAgRj42RPQ1U4ZmhEtvwpyAAawvsr+yx8AGHX51d9IvboiH k20A== X-Gm-Message-State: AIkVDXLbIzQ/1wPBLrq1kc1dFubIBFapKqXAUVjymIVfe3F74JXv3svgorlfARRllyGgYkNkwY5RBX8JmRwtwQ== X-Received: by 10.36.250.65 with SMTP id v62mr20754328ith.100.1485873670448; Tue, 31 Jan 2017 06:41:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.224.198 with HTTP; Tue, 31 Jan 2017 06:41:09 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Tue, 31 Jan 2017 14:41:09 +0000 Message-ID: Subject: Re: Acceptance Tests against a browser (WIP) To: Atira Odhner Cc: George Gelashvili , 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 On Mon, Jan 30, 2017 at 9:23 PM, Atira Odhner wrote: > Here's the patch with one more fix -- cleaning up the connections that get > created in pgAdmin. Hmm, I had trouble with this one. I noticed a few issues: - The tests started pgAdmin listening on the default port (5050), however, I already had an instance running on there; a) It should have detected that something else was running on the port b) Shouldn't we just use a random, unused port? - Errors were given because I already had an acceptance_test_db on a number of servers, and that contained the test table. Obviously the code now cleans up after itself, but I think we should use a random database name as the main regression tests do (they append a random number to the name iirc). - Some of the tests just seemed to time out. I *think* this might be because the test browser window opens quite narrowly, and it looks like the tests are probably trying to do things with nodes that aren't actually visible. ====================================================================== ERROR: runTest (pgadmin.acceptance.tests.connect_to_server_feature_test.ConnectsToServerFeatureTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/connect_to_server_feature_test.py", line 69, in tearDown self.app_starter.stop_app() File "/Users/dpage/git/pgadmin4/web/regression/utils/app_starter.py", line 27, in stop_app os.killpg(os.getpgid(self.pgadmin_process.pid), signal.SIGTERM) OSError: [Errno 3] No such process ====================================================================== ERROR: runTest (pgadmin.acceptance.tests.sql_template_selection_by_postgres_version_works_feature_test.SQLTemplateSelectionByPostgresVersionWorksFeatureTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/sql_template_selection_by_postgres_version_works_feature_test.py", line 37, in runTest self.page.find_by_xpath("//*[@id='tree']//*[@class='aciTreeText' and .='Trigger Functions']").click() File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 45, in find_by_xpath return self.wait_for_element(lambda: self.driver.find_element_by_xpath(xpath)) File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 72, in wait_for_element return self._wait_for("element to exist", element_if_it_exists) File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 106, in _wait_for raise RuntimeError("timed out waiting for " + waiting_for_message) RuntimeError: timed out waiting for element to exist ====================================================================== ERROR: runTest (pgadmin.acceptance.tests.sql_template_selection_by_postgres_version_works_feature_test.SQLTemplateSelectionByPostgresVersionWorksFeatureTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/sql_template_selection_by_postgres_version_works_feature_test.py", line 60, in tearDown self.page.find_by_xpath("//button[contains(.,'Cancel')]").click() File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 45, in find_by_xpath return self.wait_for_element(lambda: self.driver.find_element_by_xpath(xpath)) File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 72, in wait_for_element return self._wait_for("element to exist", element_if_it_exists) File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py", line 106, in _wait_for raise RuntimeError("timed out waiting for " + waiting_for_message) RuntimeError: timed out waiting for element to exist ---------------------------------------------------------------------- Thanks. -- 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