Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 2.08 KB

test.md

File metadata and controls

41 lines (32 loc) · 2.08 KB

Test Sonuçları Raporu

Aşağıda, dbqueue kütüphanesi için oluşturulan ve çalıştırılan testlerin detayları yer almaktadır.

📊 Özet

  • Toplam Test Sayısı: 7
  • Başarılı: 7
  • Başarısız: 0
  • Süre: ~0.32s

🧪 Çalıştırılan Testler

1. Formatters (tests/test_formatters.py)

Veri dönüştürme modüllerinin doğruluğu test edildi.

  • test_simple_formatter: SimpleFormatter'ın veriyi olduğu gibi (veya minimal değişiklikle) aktardığı doğrulandı.
  • test_debezium_like_formatter: DebeziumLikeFormatter'ın op kodlarını (insert -> c, update -> u) ve veri yapısını (before, after, source) doğru oluşturduğu doğrulandı.
  • test_decimal_serialization: Decimal gibi özel tiplerin korunup korunmadığı kontrol edildi.

2. Source (tests/test_source.py)

Postgres bağlantısı ve veri okuma mantığı mock (taklit) nesnelerle test edildi.

  • test_source_connect: Postgres'e bağlantı, slot oluşturma ve replikasyon başlatma komutlarının doğru sırayla çağrıldığı doğrulandı.
  • test_source_consume_event: Gelen WAL mesajının decode edilip edilmediği ve LSN (Log Sequence Number) bilgisinin Postgres'e geri bildirildiği (ack) doğrulandı.

3. Transport (tests/test_transport.py)

RabbitMQ yayınlama mantığı mock nesnelerle test edildi.

  • test_transport_connect: RabbitMQ exchange tanımlama (declare) işleminin doğru parametrelerle yapıldığı doğrulandı.
  • test_transport_publish: Mesajın doğru exchange ve routing_key ile RabbitMQ kanalına gönderildiği doğrulandı.

🖥️ Terminal Çıktısı

tests/test_formatters.py::test_simple_formatter PASSED
tests/test_formatters.py::test_debezium_like_formatter PASSED
tests/test_formatters.py::test_decimal_serialization PASSED
tests/test_source.py::test_source_connect PASSED
tests/test_source.py::test_source_consume_event PASSED
tests/test_transport.py::test_transport_connect PASSED
tests/test_transport.py::test_transport_publish PASSED

========================== 7 passed in 0.32s ===========================