Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Test Stasis message bus. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/module.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_message_router.h"
#include "asterisk/test.h"
Go to the source code of this file.
Data Structures | |
struct | cache_test_data |
struct | consumer |
struct | cts |
struct | test_message_types |
Macros | |
#define | test_category "/stasis/core/" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (cache) | |
AST_TEST_DEFINE (cache_dump) | |
AST_TEST_DEFINE (cache_eid_aggregate) | |
AST_TEST_DEFINE (cache_filter) | |
AST_TEST_DEFINE (caching_dtor_order) | |
AST_TEST_DEFINE (combo_filters) | |
AST_TEST_DEFINE (dtor_order) | |
AST_TEST_DEFINE (formatter_filters) | |
AST_TEST_DEFINE (forward) | |
AST_TEST_DEFINE (interleaving) | |
AST_TEST_DEFINE (message) | |
AST_TEST_DEFINE (message_type) | |
AST_TEST_DEFINE (no_to_ami) | |
AST_TEST_DEFINE (no_to_json) | |
AST_TEST_DEFINE (publish) | |
AST_TEST_DEFINE (publish_pool) | |
AST_TEST_DEFINE (publish_sync) | |
AST_TEST_DEFINE (router) | |
AST_TEST_DEFINE (router_cache_updates) | |
AST_TEST_DEFINE (router_pool) | |
AST_TEST_DEFINE (subscription_interleaving) | |
AST_TEST_DEFINE (subscription_messages) | |
AST_TEST_DEFINE (subscription_pool_messages) | |
AST_TEST_DEFINE (to_ami) | |
AST_TEST_DEFINE (to_json) | |
AST_TEST_DEFINE (type_filters) | |
AST_TEST_DEFINE (unsubscribe_stops_messages) | |
static const char * | cache_simple (struct stasis_message *message) |
static struct stasis_message * | cache_test_aggregate_calc_fn (struct stasis_cache_entry *entry, struct stasis_message *new_snapshot) |
static void | cache_test_aggregate_publish_fn (struct stasis_topic *topic, struct stasis_message *aggregate) |
static void | cache_test_data_dtor (void *obj) |
static const char * | cache_test_data_id (struct stasis_message *message) |
static struct stasis_message * | cache_test_message_create (struct stasis_message_type *type, const char *name, const char *value) |
static struct stasis_message * | cache_test_message_create_full (struct stasis_message_type *type, const char *name, const char *value, struct ast_eid *eid) |
static int | check_cache_aggregate (struct stasis_cache *cache, struct stasis_message_type *cache_type, const char *id, const char *value) |
static struct consumer * | consumer_create (int ignore_subscriptions) |
static void | consumer_dtor (void *obj) |
static void | consumer_exec (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | consumer_exec_sync (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | consumer_should_stay (struct consumer *consumer, size_t expected_len) |
static int | consumer_wait_for (struct consumer *consumer, size_t expected_len) |
static int | consumer_wait_for_completion (struct consumer *consumer) |
static struct cts * | create_cts (struct ast_test *test) |
static struct test_message_types * | create_message_types (struct ast_test *test) |
static void | destroy_cts (void *obj) |
static void | destroy_message_types (void *obj) |
static void | dump_consumer (struct ast_test *test, struct cts *cts) |
static struct ast_manager_event_blob * | fake_ami (struct stasis_message *message) |
static struct ast_event * | fake_event (struct stasis_message *message) |
static struct ast_json * | fake_json (struct stasis_message *message, const struct stasis_message_sanitizer *sanitize) |
static int | is_msg (struct stasis_message *msg, struct stasis_message_type *mtype, const char *data) |
static int | load_module (void) |
static void | noop (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static const char * | noop_get_id (struct stasis_message *message) |
static int | send_msg (struct ast_test *test, struct cts *cts, struct stasis_message_type *msg_type, const char *data) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = 0 , .description = "Stasis testing" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct stasis_message_vtable | fake_vtable |
Test Stasis message bus.
Definition in file test_stasis.c.
#define test_category "/stasis/core/" |
Definition at line 41 of file test_stasis.c.
|
static |
Definition at line 2504 of file test_stasis.c.
|
static |
Definition at line 2504 of file test_stasis.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 2504 of file test_stasis.c.
AST_TEST_DEFINE | ( | cache | ) |
Definition at line 1033 of file test_stasis.c.
References ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, cache_test_data_id(), cache_test_message_create(), consumer_create(), consumer_exec(), consumer_wait_for(), consumer::messages_rxed, stasis_cache_update::new_snapshot, NULL, stasis_cache_update::old_snapshot, RAII_VAR, stasis_cache_clear_create(), stasis_cache_create(), stasis_cache_get(), stasis_cache_update_type(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_message_data(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | cache_dump | ) |
Definition at line 1132 of file test_stasis.c.
References ao2_cleanup, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, cache_test_data_id(), cache_test_message_create(), consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_cache_clear_create(), stasis_cache_create(), stasis_cache_dump(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_subscription_change_type(), stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | cache_eid_aggregate | ) |
Definition at line 1245 of file test_stasis.c.
References ao2_cleanup, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_eid_default, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, cache_test_aggregate_calc_fn(), cache_test_aggregate_publish_fn(), cache_test_data_id(), cache_test_message_create_full(), check_cache_aggregate(), consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_cache_clear_create(), stasis_cache_create_full(), stasis_cache_dump_all(), stasis_cache_dump_by_eid(), stasis_cache_get_all(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | cache_filter | ) |
Definition at line 986 of file test_stasis.c.
References ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, cache_test_data_id(), cache_test_message_create(), consumer_create(), consumer_exec(), consumer_should_stay(), NULL, RAII_VAR, stasis_cache_create(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | caching_dtor_order | ) |
Definition at line 2006 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, noop(), noop_get_id(), NULL, RAII_VAR, stasis_cache_create(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | combo_filters | ) |
Definition at line 2373 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer::complete, cts::consumer, consumer_wait_for(), consumer_wait_for_completion(), create_cts(), create_message_types(), dump_consumer(), is_msg(), consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, send_msg(), stasis_subscription_accept_formatters(), stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, STASIS_SUBSCRIPTION_FORMATTER_AMI, STASIS_SUBSCRIPTION_FORMATTER_JSON, stasis_subscription_set_filter(), stasis_unsubscribe(), cts::sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | dtor_order | ) |
Definition at line 1968 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, noop(), NULL, RAII_VAR, stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | formatter_filters | ) |
Definition at line 2301 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer::complete, cts::consumer, consumer_wait_for(), consumer_wait_for_completion(), create_cts(), create_message_types(), dump_consumer(), is_msg(), consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, send_msg(), stasis_subscription_accept_formatters(), STASIS_SUBSCRIPTION_FORMATTER_AMI, STASIS_SUBSCRIPTION_FORMATTER_EVENT, STASIS_SUBSCRIPTION_FORMATTER_JSON, stasis_unsubscribe(), cts::sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | forward | ) |
Definition at line 613 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_forward_all(), stasis_forward_cancel(), stasis_message_create(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, TEST_INIT, and stasis_subscription_change::topic.
AST_TEST_DEFINE | ( | interleaving | ) |
Definition at line 679 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), consumer::messages_rxed, NULL, RAII_VAR, stasis_forward_all(), stasis_forward_cancel(), stasis_message_create(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | message | ) |
Definition at line 99 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_eid_cmp(), AST_TEST_NOT_RUN, AST_TEST_PASS, ast_tvnow(), ast_tvsub(), NULL, RAII_VAR, stasis_message_create_full(), stasis_message_data(), stasis_message_eid(), stasis_message_timestamp(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | message_type | ) |
Definition at line 77 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, NULL, RAII_VAR, stasis_message_type_create(), STASIS_MESSAGE_TYPE_ERROR, stasis_message_type_name(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | no_to_ami | ) |
Definition at line 1892 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, stasis_message::data, NULL, RAII_VAR, stasis_message_create(), stasis_message_to_ami(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | no_to_json | ) |
Definition at line 1821 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ast_json_unref(), AST_TEST_NOT_RUN, AST_TEST_PASS, stasis_message::data, NULL, RAII_VAR, stasis_message_create(), stasis_message_to_json(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | publish | ) |
Definition at line 424 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), consumer::messages_rxed, NULL, RAII_VAR, stasis_message_create(), stasis_message_data(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, and stasis_subscription_change::topic.
AST_TEST_DEFINE | ( | publish_pool | ) |
Definition at line 518 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), consumer::messages_rxed, NULL, RAII_VAR, stasis_message_create(), stasis_message_data(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe_pool, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, and stasis_subscription_change::topic.
AST_TEST_DEFINE | ( | publish_sync | ) |
Definition at line 471 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec_sync(), consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, stasis_message_create(), stasis_message_data(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish_sync(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, and stasis_subscription_change::topic.
AST_TEST_DEFINE | ( | router | ) |
Definition at line 1505 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_message_create(), stasis_message_router_add(), stasis_message_router_create, stasis_message_router_set_default(), stasis_message_router_unsubscribe_and_join(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_topic_create(), test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | router_cache_updates | ) |
Definition at line 1710 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, cache, cache_simple(), consumer_create(), consumer_exec(), consumer_should_stay(), consumer_wait_for(), NULL, RAII_VAR, stasis_cache_create(), stasis_cache_update_type(), stasis_caching_get_topic(), stasis_caching_topic_create(), stasis_caching_unsubscribe_and_join(), stasis_message_create(), stasis_message_data(), stasis_message_router_add(), stasis_message_router_add_cache_update(), stasis_message_router_create, stasis_message_router_set_default(), stasis_message_router_unsubscribe_and_join(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_topic_create(), test_category, TEST_EXECUTE, TEST_INIT, and update().
AST_TEST_DEFINE | ( | router_pool | ) |
Definition at line 1601 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_message_create(), stasis_message_router_add(), stasis_message_router_create_pool, stasis_message_router_set_default(), stasis_message_router_unsubscribe_and_join(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_topic_create(), test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | subscription_interleaving | ) |
Definition at line 762 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for(), NULL, RAII_VAR, stasis_forward_all(), stasis_forward_cancel(), stasis_message_create(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_subscribe_pool, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | subscription_messages | ) |
Definition at line 314 of file test_stasis.c.
References ao2_cleanup, ao2_ref, ast_free, ast_strdup, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for_completion(), stasis_subscription_change::description, consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, stasis_message_data(), stasis_subscribe, stasis_subscription_change_type(), stasis_subscription_uniqueid(), stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, stasis_subscription_change::topic, and stasis_subscription_change::uniqueid.
AST_TEST_DEFINE | ( | subscription_pool_messages | ) |
Definition at line 369 of file test_stasis.c.
References ao2_cleanup, ao2_ref, ast_free, ast_strdup, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_wait_for_completion(), stasis_subscription_change::description, consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, stasis_message_data(), stasis_subscribe_pool, stasis_subscription_change_type(), stasis_subscription_uniqueid(), stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, stasis_subscription_change::topic, and stasis_subscription_change::uniqueid.
AST_TEST_DEFINE | ( | to_ami | ) |
Definition at line 1929 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, stasis_message::data, fake_vtable, NULL, RAII_VAR, stasis_message_create(), stasis_message_to_ami(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | to_json | ) |
Definition at line 1858 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ast_json_equal(), ast_json_string_create(), ast_json_unref(), AST_TEST_NOT_RUN, AST_TEST_PASS, stasis_message::data, fake_vtable, NULL, RAII_VAR, stasis_message_create(), stasis_message_to_json(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, test_category, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | type_filters | ) |
Definition at line 2234 of file test_stasis.c.
References ao2_cleanup, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer::complete, cts::consumer, consumer_wait_for(), consumer_wait_for_completion(), create_cts(), create_message_types(), dump_consumer(), is_msg(), consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, send_msg(), stasis_subscription_accept_message_type(), stasis_subscription_decline_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, stasis_subscription_set_filter(), stasis_unsubscribe(), cts::sub, test_category, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | unsubscribe_stops_messages | ) |
Definition at line 567 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, AST_TEST_NOT_RUN, AST_TEST_PASS, consumer_create(), consumer_exec(), consumer_should_stay(), NULL, RAII_VAR, stasis_message_create(), stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_publish(), stasis_subscribe, stasis_topic_create(), stasis_unsubscribe(), test_category, TEST_EXECUTE, TEST_INIT, and stasis_subscription_change::topic.
|
static |
Definition at line 1699 of file test_stasis.c.
References ast_begins_with(), NULL, and stasis_message_type_name().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 911 of file test_stasis.c.
References ao2_bump, ast_log, cache_test_message_create_full(), LOG_ERROR, NULL, stasis_cache_entry_get_aggregate(), stasis_cache_entry_get_local(), stasis_cache_entry_get_remote(), stasis_message_data(), and type.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 965 of file test_stasis.c.
References stasis_publish().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 867 of file test_stasis.c.
References ast_free, cache_test_data::id, and cache_test_data::value.
Referenced by cache_test_message_create_full().
|
static |
Definition at line 901 of file test_stasis.c.
References cache_test_data::id, NULL, stasis_message_data(), and stasis_message_type_name().
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 896 of file test_stasis.c.
References ast_eid_default, cache_test_message_create_full(), name, type, and value.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 875 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ast_assert, ast_strdup, cache_test_data_dtor(), stasis_message::data, stasis_message::eid, name, NULL, RAII_VAR, stasis_message_create_full(), type, and value.
Referenced by AST_TEST_DEFINE(), cache_test_aggregate_calc_fn(), and cache_test_message_create().
|
static |
Definition at line 970 of file test_stasis.c.
References ao2_cleanup, cache, NULL, RAII_VAR, stasis_cache_get_by_eid(), stasis_message_data(), and value.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 183 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ast_cond_init, ast_malloc, consumer_dtor(), consumer::ignore_subscriptions, consumer::messages_rxed, NULL, and consumer::out.
|
static |
Definition at line 170 of file test_stasis.c.
References ao2_cleanup, ast_cond_destroy, ast_free, consumer::messages_rxed, consumer::messages_rxed_len, NULL, and consumer::out.
Referenced by consumer_create().
|
static |
Definition at line 204 of file test_stasis.c.
References ao2_cleanup, ao2_ref, ast_assert, ast_cond_signal, ast_realloc, consumer::complete, consumer::ignore_subscriptions, lock, consumer::messages_rxed, consumer::messages_rxed_len, NULL, consumer::out, RAII_VAR, SCOPED_AO2LOCK, stasis_subscription_change_type(), stasis_subscription_final_message(), and sub.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and create_cts().
|
static |
Definition at line 226 of file test_stasis.c.
References ao2_cleanup, ao2_ref, ast_assert, ast_realloc, consumer::complete, consumer::ignore_subscriptions, lock, consumer::messages_rxed, consumer::messages_rxed_len, NULL, RAII_VAR, SCOPED_AO2LOCK, stasis_subscription_change_type(), stasis_subscription_final_message(), and sub.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 288 of file test_stasis.c.
References ao2_object_get_lockaddr(), ast_assert, ast_cond_timedwait, ast_tvadd(), ast_tvnow(), end, lock, consumer::messages_rxed_len, consumer::out, and SCOPED_AO2LOCK.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 246 of file test_stasis.c.
References ao2_object_get_lockaddr(), ast_assert, ast_cond_timedwait, ast_tvnow(), end, lock, consumer::messages_rxed_len, consumer::out, and SCOPED_AO2LOCK.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 267 of file test_stasis.c.
References ao2_object_get_lockaddr(), ast_assert, ast_cond_timedwait, ast_tvnow(), consumer::complete, end, lock, consumer::out, and SCOPED_AO2LOCK.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2154 of file test_stasis.c.
References ao2_alloc, ao2_cleanup, ao2_ref, cleanup(), cts::consumer, consumer_create(), consumer_exec(), destroy_cts(), NULL, stasis_subscribe, stasis_topic_create(), cts::sub, and cts::topic.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2080 of file test_stasis.c.
References test_message_types::ami, test_message_types::amievent, ao2_alloc, ao2_cleanup, test_message_types::change, cleanup(), destroy_message_types(), test_message_types::event, fake_ami(), fake_event(), fake_json(), test_message_types::json, test_message_types::none, NULL, stasis_message_type_create(), STASIS_MESSAGE_TYPE_SUCCESS, stasis_subscription_change_type(), stasis_message_vtable::to_ami, stasis_message_vtable::to_event, stasis_message_vtable::to_json, test_message_types::type1, test_message_types::type2, and test_message_types::type3.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2145 of file test_stasis.c.
References ao2_cleanup, c, and stasis_unsubscribe().
Referenced by create_cts().
|
static |
Definition at line 2065 of file test_stasis.c.
References test_message_types::ami, test_message_types::amievent, ao2_cleanup, test_message_types::event, test_message_types::json, test_message_types::none, test_message_types::type1, test_message_types::type2, and test_message_types::type3.
Referenced by create_message_types().
|
static |
Definition at line 2193 of file test_stasis.c.
References ast_strlen_zero(), ast_test_status_update, consumer::complete, cts::consumer, stasis_subscription_change::description, consumer::messages_rxed, consumer::messages_rxed_len, stasis_message_data(), and stasis_message_type_name().
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 56 of file test_stasis.c.
References ao2_cleanup, ao2_ref, ast_manager_event_blob_create(), EVENT_FLAG_TEST, NULL, RAII_VAR, stasis_message_data(), and text.
Referenced by create_message_types().
|
static |
Definition at line 43 of file test_stasis.c.
References AST_EVENT_CUSTOM, AST_EVENT_IE_DESCRIPTION, AST_EVENT_IE_END, AST_EVENT_IE_PLTYPE_STR, and ast_event_new().
Referenced by create_message_types().
|
static |
Definition at line 49 of file test_stasis.c.
References ast_json_string_create(), stasis_message_data(), and text.
Referenced by create_message_types().
|
static |
Definition at line 2178 of file test_stasis.c.
References mtype, and stasis_message_data().
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2468 of file test_stasis.c.
References AST_MODULE_LOAD_SUCCESS, AST_TEST_REGISTER, cache, publish, router, and to_ami().
|
static |
Definition at line 1962 of file test_stasis.c.
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
|
static |
Definition at line 2208 of file test_stasis.c.
References ao2_alloc, ao2_ref, ast_test_status_update, NULL, S_OR, stasis_message_create(), stasis_message_type_name(), stasis_publish(), and cts::topic.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2436 of file test_stasis.c.
References AST_TEST_UNREGISTER, cache, publish, router, and to_ami().
|
static |
Definition at line 2504 of file test_stasis.c.
|
static |
Definition at line 2504 of file test_stasis.c.
|
static |
Definition at line 72 of file test_stasis.c.
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().