lidavidm commented on code in PR #36676:
URL: https://github.com/apache/arrow/pull/36676#discussion_r1263810359


##########
go/arrow/cdata/cdata_test.go:
##########
@@ -769,6 +769,21 @@ func TestExportRecordReaderStream(t *testing.T) {
        assert.EqualValues(t, len(reclist), i)
 }
 
+func TestExportRecordReaderStreamLifetime(t *testing.T) {
+       reclist := arrdata.Records["primitives"]
+       rdr, _ := array.NewRecordReader(reclist[0].Schema(), reclist)
+
+       out := createTestStreamObj()
+       ExportRecordReader(rdr, out)
+       releaseStream(out)
+
+       // Release once
+       rdr.Release()
+
+       // Should panic (we have no other way of checking reference count)
+       assert.Panics(t, func() { rdr.Release() })

Review Comment:
   Ah, forgot about that. Updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to