Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUUwe-0005i3-NB for pgsql-jdbc@arkaria.postgresql.org; Wed, 05 Dec 2018 11:02:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUUwc-00019l-81 for pgsql-jdbc@arkaria.postgresql.org; Wed, 05 Dec 2018 11:02:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUUwb-00019e-T4 for pgsql-jdbc@lists.postgresql.org; Wed, 05 Dec 2018 11:02:18 +0000 Received: from m71-131.mailgun.net ([166.78.71.131]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUUwT-0001cp-Jl for pgsql-jdbc@lists.postgresql.org; Wed, 05 Dec 2018 11:02:16 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=github.com; q=dns/txt; s=mailo; t=1544007728; h=Content-Transfer-Encoding: Content-Type: Mime-Version: Subject: Message-ID: To: Reply-To: From: Date: Sender; bh=24haOMs1xrnlQyoiaCXeHTKEIhQINU4/maBImF5niW8=; b=o5ukjWmhSgcq4Z5jugPOfYqZAOgLV4yM5s7gInEUR4GWOemPbBBlka11lxFvr+BvFvKK/uCC ajBvtUiddbRBcNl0O6Ey/6IxICHCMRTHDcsC6FAJzFBYJjH3AFZhu89uJVhnp0uCpOGsbxS5 cGNEGihzaEvkzy8fNPlBJVaBhLs= X-Mailgun-Sending-Ip: 166.78.71.131 X-Mailgun-Sid: WyJkYWFjYiIsICJwZ3NxbC1qZGJjQGxpc3RzLnBvc3RncmVzcWwub3JnIiwgIjQwZiJd Sender: sehrope=jackdb.com@github.com Received: from github.com (Unknown [192.30.252.37]) by mxa.mailgun.org with ESMTP id 5c07b030.7f76b13e7780-smtp-out-n03; Wed, 05 Dec 2018 11:02:08 -0000 (UTC) Date: Wed, 05 Dec 2018 03:02:07 -0800 From: Sehrope Sarkuni Reply-To: Sehrope Sarkuni To: pgsql-jdbc@lists.postgresql.org Message-ID: <5c07b02f1ba13_4a892ab63ff56584367d7@hookshot-fe-32b5f5b.cp1-iad.github.net.mail> Subject: [pgjdbc/pgjdbc] 0999bb: Fix TestUtil.dropXyz(...) object not exists errors... Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="--==_mimepart_5c07b02f1b616_4a892ab63ff5658436635"; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ----==_mimepart_5c07b02f1b616_4a892ab63ff5658436635 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 0999bb78ecb0a305f830d8b76ae24f6e64444ec8 https://github.com/pgjdbc/pgjdbc/commit/0999bb78ecb0a305f830d8b76ae24f6e64444ec8 Author: Sehrope Sarkuni Date: 2018-12-05 (Wed, 05 Dec 2018) Changed paths: M pgjdbc/src/test/java/org/postgresql/test/TestUtil.java M pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java Log Message: ----------- Fix TestUtil.dropXyz(...) object not exists errors (#1359) * test: Change drop object utilities in TestUtils to use IF EXISTS Changes most drop object helper methods in TestUtils to check if a transaction is in progress and, if not, then use IF EXISTS to suppress errors for missing objects during the DROP command. If a transaction is in progress then the command then the drop is executed without the IF EXISTS clause so that missing objects results in an exception and test failure. In either case an unrelated error such as the server being offline will be now throw an exception. This is a change from the prior behavior where all errors that are not part of a transaction were being suppressed. errors if the object being dropped does not exist. * test: Change TestUtil.dropSequence(...) to add CASCADE Adds CASCADE option to TestUtils.dropSequence(...) helper to handle dependency errors in drop statements that previously being ignored. * test: Add shouldDrop param to TestUtils.createCompositeType(...) Also adds a method matching the previous signature without the new parameter and defaulting to the older behaviour of true (i.e. drop then create). * test: Use explicit drop type statements for metadata tests Adds explicit drop statements for types in metadata tests to ensure the drop statements are executed in the correct order. Also adds a drop statement for the reference table. The revised drop order is required as TestUtils no longer skips over non-missing object errors when dropping objects. * test: Clean up throws clauses in TestUtil Restricts throws clauses in TestUtil to SQLException rather than a more broad Exception and removes throws clause from initDriver(). **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019. ----==_mimepart_5c07b02f1b616_4a892ab63ff5658436635--