toxiproxy-close-connection.td 855 B

123456789101112131415161718192021222324
  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. > SELECT COUNT(*) = 0 FROM mz_internal.mz_source_statuses WHERE error LIKE '%Connection refused%';
  10. true
  11. # This REST call will cause toxiproxy to close the connection.
  12. $ http-request method=POST url=http://toxiproxy:8474/proxies/postgres content-type=application/json
  13. {
  14. "name": "postgres",
  15. "listen": "0.0.0.0:5432",
  16. "upstream": "postgres:5432",
  17. "enabled": false
  18. }
  19. > SELECT COUNT(*) > 0 FROM mz_internal.mz_source_statuses WHERE error LIKE '%Connection refused%';
  20. true