func TestQueryAbortedWithLessResultsDuringRetry(t *testing.T) {
	testRetryReadWriteTransactionWithQuery(t, nil, codes.OK, 0, 2, 1,
		func(server testutil.InMemSpannerServer) {
			server.PutExecutionTime(testutil.MethodCommitTransaction, testutil.SimulatedExecutionTime{
				Errors: []error{status.Errorf(codes.Aborted, "Aborted")},
			})
			// Replace the original query result with a new one with an additional row
			// before the transaction is committed. This will cause the retry to fail.
			server.PutStatementResult(testutil.SelectFooFromBar, &testutil.StatementResult{
				Type:      testutil.StatementResultResultSet,
				ResultSet: testutil.CreateSingleColumnResultSet([]int64{1}, "FOO"),
			})
		}, ErrAbortedDueToConcurrentModification)
}
// Tests that receiving less results during the retry will cause a failed retry.
Tests that receiving less results during the retry will cause a failed retry.
// Tests that receiving less results during the retry will cause a failed retry .
func TestQueryAbortedWithLessResultsDuringRetry(t *testing.T) {
	testRetryReadWriteTransactionWithQuery(t, nil, codes.OK, 0, 2, 1,
		func(server testutil.InMemSpannerServer) {
			server.PutExecutionTime(testutil.MethodCommitTransaction, testutil.SimulatedExecutionTime{
				Errors: []error{status.Errorf(codes.Aborted, "Aborted")},
			})
			server.PutStatementResult(testutil.SelectFooFromBar, &testutil.StatementResult{
				Type:      testutil.StatementResultResultSet,
				ResultSet: testutil.CreateSingleColumnResultSet([]int64{1}, "FOO"),
			})
		}, ErrAbortedDueToConcurrentModification)
}
func TestQueryAbortedWithLessResultsDuringRetry ( t * testing . T ) { testRetryReadWriteTransactionWithQuery ( t , nil , codes . OK , 0 , 2 , 1 , func ( server testutil . InMemSpannerServer ) { server . PutExecutionTime ( testutil . MethodCommitTransaction , testutil . SimulatedExecutionTime { Errors : [ ] error { status . Errorf ( codes . Aborted , " " ) } , } ) server . PutStatementResult ( testutil . SelectFooFromBar , & testutil . StatementResult { Type : testutil . StatementResultResultSet , ResultSet : testutil . CreateSingleColumnResultSet ( [ ] int64 { 1 } , " " ) , } ) } , ErrAbortedDueToConcurrentModification ) }
Tests that receiving less results during the retry will cause a failed retry.
Tests that receiving less results during the retry will cause a failed retry .
// Replace the original query result with a new one with an additional row // before the transaction is committed. This will cause the retry to fail.