syslog-ng source
test_logthrdestdrv.c File Reference
#include <criterion/criterion.h>
#include "libtest/grab-logging.h"
#include "libtest/stopwatch.h"
#include "libtest/cr_template.h"
#include "logthrdest/logthrdestdrv.h"
#include "mainloop-worker.h"
#include "apphook.h"
Include dependency graph for test_logthrdestdrv.c:

Classes

struct  TestThreadedDestDriver
 

Macros

#define MAX_SPIN_ITERATIONS   10000
 
#define FAILING_ATTEMPTS_DROP   2
 
#define FAILING_ATTEMPTS_NOTCONN   20
 

Functions

 Test (logthrdestdrv, driver_can_be_instantiated_and_one_message_is_properly_processed)
 
 Test (logthrdestdrv, non_local_messages_dont_increment_seq_num)
 
 Test (logthrdestdrv, message_drops_are_accounted_in_the_drop_counter_and_are_reported_properly)
 
 Test (logthrdestdrv, connection_failure_is_considered_an_error_and_retried_indefinitely)
 
 Test (logthrdestdrv, error_result_retries_sending_retry_max_times_and_then_drops)
 
 Test (logthrdestdrv, error_result_retries_sending_retry_max_times_and_then_accepts)
 
 Test (logthrdestdrv, batched_set_of_messages_are_successfully_delivered)
 
 Test (logthrdestdrv, batched_set_of_messages_are_dropped_as_a_whole)
 
 Test (logthrdestdrv, when_batched_set_of_messages_result_in_error_the_entire_batch_is_attempted_again_retry_count_times_and_then_dropped)
 
 Test (logthrdestdrv, when_batched_set_of_messages_result_in_error_the_entire_batch_is_attempted_again_and_then_successfully_delivered)
 
 Test (logthrdestdrv, when_batched_set_of_messages_result_in_not_connected_the_entire_batch_is_attempted_again_and_then_successfully_delivered)
 
 Test (logthrdestdrv, throttle_is_applied_to_delivery_and_causes_flush_to_be_called_more_often)
 
 Test (logthrdestdrv, batch_timeout_delays_flush_to_the_specified_interval)
 
 Test (logthrdestdrv, batch_timeout_limits_flush_frequency)
 
 Test (logthrdestdrv, test_connect_failure_kicks_in_suspend_retry_logic_which_keeps_reconnecting_until_successful)
 
 Test (logthrdestdrv, test_explicit_ack_accept)
 
 TestSuite (logthrdestdrv,.init=setup,.fini=teardown)
 

Variables

TestThreadedDestDriverdd
 
MainLoop * main_loop
 
MainLoopOptions main_loop_options = {0}
 

Macro Definition Documentation

◆ FAILING_ATTEMPTS_DROP

#define FAILING_ATTEMPTS_DROP   2

◆ FAILING_ATTEMPTS_NOTCONN

#define FAILING_ATTEMPTS_NOTCONN   20

◆ MAX_SPIN_ITERATIONS

#define MAX_SPIN_ITERATIONS   10000

Function Documentation

◆ Test() [1/16]

Test ( logthrdestdrv  ,
batch_timeout_delays_flush_to_the_specified_interval   
)

◆ Test() [2/16]

Test ( logthrdestdrv  ,
batch_timeout_limits_flush_frequency   
)

◆ Test() [3/16]

Test ( logthrdestdrv  ,
batched_set_of_messages_are_dropped_as_a_whole   
)

◆ Test() [4/16]

Test ( logthrdestdrv  ,
batched_set_of_messages_are_successfully_delivered   
)

◆ Test() [5/16]

Test ( logthrdestdrv  ,
connection_failure_is_considered_an_error_and_retried_indefinitely   
)

◆ Test() [6/16]

Test ( logthrdestdrv  ,
driver_can_be_instantiated_and_one_message_is_properly_processed   
)

◆ Test() [7/16]

Test ( logthrdestdrv  ,
error_result_retries_sending_retry_max_times_and_then_accepts   
)

◆ Test() [8/16]

Test ( logthrdestdrv  ,
error_result_retries_sending_retry_max_times_and_then_drops   
)

◆ Test() [9/16]

Test ( logthrdestdrv  ,
message_drops_are_accounted_in_the_drop_counter_and_are_reported_properly   
)

◆ Test() [10/16]

Test ( logthrdestdrv  ,
non_local_messages_dont_increment_seq_num   
)

◆ Test() [11/16]

Test ( logthrdestdrv  ,
test_connect_failure_kicks_in_suspend_retry_logic_which_keeps_reconnecting_until_successful   
)

◆ Test() [12/16]

Test ( logthrdestdrv  ,
test_explicit_ack_accept   
)

◆ Test() [13/16]

Test ( logthrdestdrv  ,
throttle_is_applied_to_delivery_and_causes_flush_to_be_called_more_often   
)

◆ Test() [14/16]

Test ( logthrdestdrv  ,
when_batched_set_of_messages_result_in_error_the_entire_batch_is_attempted_again_and_then_successfully_delivered   
)

◆ Test() [15/16]

Test ( logthrdestdrv  ,
when_batched_set_of_messages_result_in_error_the_entire_batch_is_attempted_again_retry_count_times_and_then_dropped   
)

◆ Test() [16/16]

Test ( logthrdestdrv  ,
when_batched_set_of_messages_result_in_not_connected_the_entire_batch_is_attempted_again_and_then_successfully_delivered   
)

◆ TestSuite()

TestSuite ( logthrdestdrv  ,
init = setup,
fini = teardown 
)

Variable Documentation

◆ dd

◆ main_loop

MainLoop* main_loop

◆ main_loop_options

MainLoopOptions main_loop_options = {0}