@@ -1695,7 +1695,7 @@ func TestSendRecv(t *testing.T) {
16951695 assert .Equal (t , "--" , result , "expected receive workflow result to be '--' (timeout)" )
16961696 })
16971697
1698- t .Run ("TestSendRecv " , func (t * testing.T ) {
1698+ t .Run ("TestConcurrentRecvs " , func (t * testing.T ) {
16991699 // Test concurrent receivers - only 1 should timeout, others should get errors
17001700 receiveTopic := "concurrent-recv-topic"
17011701
@@ -1760,6 +1760,15 @@ func TestSendRecv(t *testing.T) {
17601760
17611761 for err := range errors {
17621762 t .Logf ("Receiver error (expected): %v" , err )
1763+
1764+ // Check that the error is of the expected type
1765+ dbosErr , ok := err .(* DBOSError )
1766+ require .True (t , ok , "expected error to be of type *DBOSError, got %T" , err )
1767+ require .Equal (t , ConflictingIDError , dbosErr .Code , "expected error code to be ConflictingIDError, got %v" , dbosErr .Code )
1768+ require .Equal (t , "concurrent-recv-wfid" , dbosErr .WorkflowID , "expected workflow ID to be 'concurrent-recv-wfid', got %s" , dbosErr .WorkflowID )
1769+ require .True (t , dbosErr .IsBase , "expected error to have IsBase=true" )
1770+ require .Contains (t , dbosErr .Message , "Conflicting workflow ID concurrent-recv-wfid" , "expected error message to contain conflicting workflow ID" )
1771+
17631772 errorCount ++
17641773 }
17651774
0 commit comments