04-drop-publication.td 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ postgres-execute connection=postgres://postgres:postgres@postgres
  10. DROP PUBLICATION mz_source;
  11. INSERT INTO t VALUES (1);
  12. > SELECT name, status FROM mz_internal.mz_source_statuses;
  13. pg_source stalled
  14. pg_source_progress running
  15. t ceased
  16. > SELECT error ILIKE '%publication "mz_source" does not exist' FROM mz_internal.mz_source_statuses WHERE name = 'pg_source';
  17. true
  18. # Check that new status reflects error from source.
  19. > SELECT error ILIKE '%publication "mz_source" does not exist' FROM mz_internal.mz_source_statuses WHERE name = 't';
  20. true
  21. # TODO: This should be made reliable without sleeping, database-issues#7611
  22. $ sleep-is-probably-flaky-i-have-justified-my-need-with-a-comment duration=2s
  23. ! SELECT * FROM t;
  24. contains:publication "mz_source" does not exist
  25. # Tests must exit with healthy sources
  26. > DROP SOURCE pg_source CASCADE;