module_t rlm_test = {
.magic = RLM_MODULE_INIT,
.name = "test",
- .type = RLM_TYPE_THREAD_SAFE,
+ .type = RLM_TYPE_THREAD_SAFE | RLM_TYPE_RETRY,
.inst_size = sizeof(rlm_test_t),
.thread_inst_size = sizeof(rlm_test_thread_t),
.config = module_config,
--- /dev/null
+#
+# PRE: retry-section
+#
+
+#
+# We can't really check anything here, but this should at least parse and work.
+#
+noop {
+ noop = retry
+ retry {
+ max_rtx_count = 2
+ }
+}
+
+success
--- /dev/null
+# PRE: update if
+
+update request {
+ &Tmp-Integer-0 := 0
+}
+
+group {
+ update request {
+ &Tmp-Integer-0 := "%{expr: &Tmp-Integer-0 + 1}"
+ }
+
+ noop
+ actions {
+ noop = retry
+
+ retry {
+ max_rtx_count = 3
+ }
+ }
+}
+
+if (&Tmp-Integer-0 != 3) {
+ test_fail
+}
+
+success
--- /dev/null
+#
+# PRE: retry-module test
+#
+
+#
+# Run the "test" module, using its native retry functionality
+#
+
+test.retry {
+ retry {
+ initial_rtx_time = 1
+ max_rtx_duration = 3
+ max_rtx_count = 2
+ max_rtx_duration = 5
+ }
+}
+
+success