File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change 66 "fmt"
77 "reflect"
88 "runtime"
9- "strings"
109 "sync"
1110 "sync/atomic"
1211 "testing"
@@ -508,26 +507,6 @@ func TestWorkflowsRegistration(t *testing.T) {
508507 result10 , err := handle10 .GetResult ()
509508 require .NoError (t , err , "failed to get result from workflow10" )
510509 assert .Equal (t , testPtrMap , result10 , "unexpected result from workflow10" )
511-
512- t .Run ("validPanic" , func (t * testing.T ) {
513- // Verify that non-duplicate registration panics are still propagated
514- workflow11 := func (ctx DBOSContext , input any ) (any , error ) {
515- return input , nil
516- }
517-
518- // This should panic during registration because interface{} creates a nil value
519- // which gob.Register cannot handle
520- defer func () {
521- r := recover ()
522- require .NotNil (t , r , "expected panic from interface{} registration but got none" )
523- // Verify it's not a duplicate registration error (which would be caught)
524- if errStr , ok := r .(string ); ok {
525- assert .False (t , strings .Contains (errStr , "gob: registering duplicate" ),
526- "panic should not be a duplicate registration error, got: %v" , r )
527- }
528- }()
529- RegisterWorkflow (freshCtx , workflow11 ) // This should panic
530- })
531510 })
532511}
533512
You can’t perform that action at this time.
0 commit comments