lidavidm commented on code in PR #36676: URL: https://github.com/apache/arrow/pull/36676#discussion_r1263065201
########## 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: Hmm. Is there a better way of testing it? This isn't a strictly necessary test, just realized we didn't have an explicit test of this. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org