File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2946,8 +2946,8 @@ func TestValuerWithValueReceiverGivenNilValue(t *testing.T) {
29462946// call to `Rows.Close`, so Context cancellation should **not** invalidate the backing buffers.
29472947func TestRawBytesAreNotModified (t * testing.T ) {
29482948 const blob = "abcdefghijklmnop"
2949- const contextRaceIterations = 10
2950- const blobSize = 3000
2949+ const contextRaceIterations = 20
2950+ const blobSize = defaultBufSize * 3 / 4 // Second row overwrites first row.
29512951 const insertRows = 4
29522952
29532953 var sqlBlobs = [2 ]string {
@@ -2981,11 +2981,11 @@ func TestRawBytesAreNotModified(t *testing.T) {
29812981 before := string (raw )
29822982 // Ensure cancelling the query does not corrupt the contents of `raw`
29832983 cancel ()
2984- time .Sleep (5 * time . Millisecond )
2984+ time .Sleep (time . Microsecond * 100 )
29852985 after := string (raw )
29862986
29872987 if before != after {
2988- t .Fatal ("the backing storage for sql.RawBytes has been modified" )
2988+ t .Fatalf ("the backing storage for sql.RawBytes has been modified (i=%v)" , i )
29892989 }
29902990 }
29912991 rows .Close ()
You can’t perform that action at this time.
0 commit comments