@@ -222,6 +222,7 @@ func testSetGetEvent[T any](
222222
223223type MyInt int
224224type MyString string
225+ type IntSliceSlice [][]int
225226
226227// Test data structures for DBOS integration testing
227228type TestData struct {
@@ -302,6 +303,11 @@ var (
302303 recoveryMyStringWorkflow = makeRecoveryWorkflow [MyString ]()
303304 recoveryMyStringSliceWorkflow = makeRecoveryWorkflow [[]MyString ]()
304305 recoveryStringMyIntMapWorkflow = makeRecoveryWorkflow [map [string ]MyInt ]()
306+ // Additional types: empty struct, nested collections, slices of pointers
307+ recoveryEmptyStructWorkflow = makeRecoveryWorkflow [struct {}]()
308+ recoveryIntSliceSliceWorkflow = makeRecoveryWorkflow [IntSliceSlice ]()
309+ recoveryNestedMapWorkflow = makeRecoveryWorkflow [map [string ]map [string ]int ]()
310+ recoveryIntPtrSliceWorkflow = makeRecoveryWorkflow [[]* int ]()
305311)
306312
307313// makeSenderWorkflow creates a generic sender workflow that sends a message to a receiver workflow.
@@ -578,6 +584,11 @@ func TestSerializer(t *testing.T) {
578584 RegisterWorkflow (executor , recoveryMyStringWorkflow )
579585 RegisterWorkflow (executor , recoveryMyStringSliceWorkflow )
580586 RegisterWorkflow (executor , recoveryStringMyIntMapWorkflow )
587+ // Register additional recovery workflows
588+ RegisterWorkflow (executor , recoveryEmptyStructWorkflow )
589+ RegisterWorkflow (executor , recoveryIntSliceSliceWorkflow )
590+ RegisterWorkflow (executor , recoveryNestedMapWorkflow )
591+ RegisterWorkflow (executor , recoveryIntPtrSliceWorkflow )
581592 // Register typed Send/Recv workflows
582593 RegisterWorkflow (executor , serializerIntSenderWorkflow )
583594 RegisterWorkflow (executor , serializerIntReceiverWorkflow )
@@ -877,6 +888,44 @@ func TestSerializer(t *testing.T) {
877888 })
878889 })
879890
891+ // Empty struct
892+ t .Run ("EmptyStruct" , func (t * testing.T ) {
893+ input := struct {}{}
894+ testAllSerializationPaths (t , executor , recoveryEmptyStructWorkflow , input , "recovery-empty-struct-wf" )
895+ })
896+
897+ // Nested collections
898+ t .Run ("NestedCollections" , func (t * testing.T ) {
899+ t .Run ("SliceOfSlices" , func (t * testing.T ) {
900+ input := IntSliceSlice {{1 , 2 }, {3 , 4 , 5 }}
901+ testAllSerializationPaths (t , executor , recoveryIntSliceSliceWorkflow , input , "recovery-int-slice-slice-wf" )
902+ })
903+
904+ t .Run ("NestedMap" , func (t * testing.T ) {
905+ input := map [string ]map [string ]int {
906+ "outer1" : {"inner1" : 1 , "inner2" : 2 },
907+ "outer2" : {"inner3" : 3 },
908+ }
909+ testAllSerializationPaths (t , executor , recoveryNestedMapWorkflow , input , "recovery-nested-map-wf" )
910+ })
911+ })
912+
913+ // Slices of pointers
914+ t .Run ("SliceOfPointers" , func (t * testing.T ) {
915+ t .Run ("NonNil" , func (t * testing.T ) {
916+ v1 := 10
917+ v2 := 20
918+ v3 := 30
919+ input := []* int {& v1 , & v2 , & v3 }
920+ testAllSerializationPaths (t , executor , recoveryIntPtrSliceWorkflow , input , "recovery-int-ptr-slice-wf" )
921+ })
922+
923+ t .Run ("NilSlice" , func (t * testing.T ) {
924+ var input []* int = nil
925+ testAllSerializationPaths (t , executor , recoveryIntPtrSliceWorkflow , input , "recovery-int-ptr-slice-nil-wf" )
926+ })
927+ })
928+
880929 // Test workflow with interface signature and manual gob registration
881930 t .Run ("InterfaceWithManualGobRegistration" , func (t * testing.T ) {
882931 // Create an instance of the concrete implementation
0 commit comments