[pgjdbc/pgjdbc] 0999bb: Fix TestUtil.dropXyz(...) object not existserrors...

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема [pgjdbc/pgjdbc] 0999bb: Fix TestUtil.dropXyz(...) object not existserrors...
Дата
Msg-id 5c07b02f1ba13_4a892ab63ff56584367d7@hookshot-fe-32b5f5b.cp1-iad.github.net.mail
обсуждение исходный текст
Список pgsql-jdbc
Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 0999bb78ecb0a305f830d8b76ae24f6e64444ec8
      https://github.com/pgjdbc/pgjdbc/commit/0999bb78ecb0a305f830d8b76ae24f6e64444ec8
  Author: Sehrope Sarkuni <sehrope@jackdb.com>
  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.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Jorge Solorzano
Дата:
Сообщение: [pgjdbc/pgjdbc] 2c0f69: test: fix misspelled secondaryPort2 buildproperty...
Следующее
От: Ray Hu
Дата:
Сообщение: [Possible Bug] EnableSSL method has no socket timeout, thread hangs indefinitely