Skip to content

Commit ff6c8c6

Browse files
committed
cleanup
1 parent ae8af6a commit ff6c8c6

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

dbos/serialization.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func deserialize[T any](serializer Serializer, encoded *string) (T, error) {
115115
return elemValue.Interface().(T), nil
116116
}
117117
// If decoded is already a pointer of the correct type, try direct assertion
118+
// this is unlikely with Gob because Gob serializes pointers as values, so it should hit the previous case instead
118119
if decodedType != nil && decodedType == tType {
119120
typedResult, ok := decoded.(T)
120121
if ok {

dbos/serialization_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,21 +1129,6 @@ func TestSerializer(t *testing.T) {
11291129

11301130
// Test RetrieveWorkflow for interface types
11311131
// TODO: not supported for interface types w/o storing the type information in the DB
1132-
/*
1133-
t.Run("RetrieveWorkflow", func(t *testing.T) {
1134-
h2, err := RetrieveWorkflow[DataProvider](executor, handle.GetWorkflowID())
1135-
require.NoError(t, err, "Failed to retrieve workflow")
1136-
1137-
retrievedResult, err := h2.GetResult()
1138-
require.NoError(t, err, "Failed to get retrieved workflow result")
1139-
1140-
// For interface types, we need to check the concrete type
1141-
concreteRetrievedResult, ok := retrievedResult.(ConcreteDataProvider)
1142-
require.True(t, ok, "Retrieved result should be ConcreteDataProvider type")
1143-
assert.Equal(t, input.Message, concreteRetrievedResult.Message, "Message should match")
1144-
assert.Equal(t, input.Value, concreteRetrievedResult.Value, "Value should match")
1145-
})
1146-
*/
11471132
})
11481133

11491134
// Test nil values with pointer type workflow

0 commit comments

Comments
 (0)