mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
**refactor(dynamic): add Kafka HTTP emulator with publish/poll/commit support, extend endpoint rewriting and stub event recording across Java, Python, and Rust**
This commit is contained in:
parent
433036aead
commit
57d3677bd4
7 changed files with 564 additions and 40 deletions
|
|
@ -176,6 +176,8 @@ fn message_handler_python_dispatch_subscribes_to_loopback() {
|
|||
entry_file("kafka_python"),
|
||||
);
|
||||
let h = lang::emit(&spec).expect("emit ok");
|
||||
assert!(h.source.contains("_nyx_try_kafka_http"));
|
||||
assert!(h.source.contains("NYX_KAFKA_ENDPOINT"));
|
||||
assert!(h.source.contains("NyxKafkaLoopback"));
|
||||
assert!(h.source.contains("subscribe"));
|
||||
assert!(h.source.contains("poll"));
|
||||
|
|
@ -192,6 +194,11 @@ fn message_handler_python_dispatch_subscribes_to_loopback() {
|
|||
fn message_handler_java_emits_reflective_dispatch() {
|
||||
let spec = make_spec(Lang::Java, "orders", "onMessage", entry_file("kafka_java"));
|
||||
let h = lang::emit(&spec).expect("emit ok");
|
||||
assert!(h.source.contains("nyxTryRealKafkaClient"));
|
||||
assert!(h.source.contains("MockConsumer"));
|
||||
assert!(h.source.contains("commitSync"));
|
||||
assert!(h.source.contains("nyxTryKafkaHttp"));
|
||||
assert!(h.source.contains("NYX_KAFKA_ENDPOINT"));
|
||||
assert!(h.source.contains("NyxKafkaLoopback"));
|
||||
assert!(h.source.contains("Class.forName"));
|
||||
assert!(h.source.contains("getDeclaredMethod"));
|
||||
|
|
|
|||
|
|
@ -945,6 +945,7 @@ fn migration_ruby_harness_carries_sentinel_and_handler() {
|
|||
assert!(h.source.contains("AddIndex"));
|
||||
assert!(h.source.contains("__nyx_stub_sql_record"));
|
||||
assert!(h.source.contains("ActiveRecord::Base.establish_connection"));
|
||||
assert!(h.source.contains("cls.migrate(:up)"));
|
||||
assert!(h.source.contains("SQLite3::Database"));
|
||||
assert!(h.source.contains("NYX_SQL_ENDPOINT"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue