From 8e0f4753bf5c3c99fdeb951da2ecc954258fdf29 Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Tue, 2 Apr 2024 13:02:16 -0700 Subject: [PATCH] more docs --- sdktests/server_side_hooks.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdktests/server_side_hooks.go b/sdktests/server_side_hooks.go index e465626..d7634b1 100644 --- a/sdktests/server_side_hooks.go +++ b/sdktests/server_side_hooks.go @@ -271,7 +271,9 @@ func beforeEvaluationDataPropagatesToAfterMigration(t *ldtest.T) { }) } -// This test is meant to check Requirement HOOKS:1.3.7. +// This test is meant to check Requirement HOOKS:1.3.7: +// The client MUST handle exceptions which are thrown (or errors returned, if idiomatic for the language) +// during the execution of a stage or handler allowing operations to complete unaffected. func errorInBeforeStageDoesNotAffectAfterStage(t *ldtest.T) { const numHooks = 100 // why not? @@ -302,6 +304,8 @@ func errorInBeforeStageDoesNotAffectAfterStage(t *ldtest.T) { DefaultValue: ldvalue.Bool(false), }) + // Since we shouldn't receive any beforeEvaluation calls, the number of calls to expect is simply + // the number of hooks configured. const numAfterCalls = numHooks calls := hooks.ExpectSingleCallForEachHook(t, names, numAfterCalls)