Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Dec 18, 2024
1 parent 9377ac4 commit 9ff0bed
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/test/pq/pipeline_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,45 +92,45 @@ namespace
}

{
auto tr = connection->pipeline();
auto pl = connection->pipeline();

tr->send( "SELECT 42" );
tr->send( "SELECT 1234" );
tr->sync();
pl->send( "SELECT 42" );
pl->send( "SELECT 1234" );
pl->sync();

TEST_ASSERT( tr->get_result().as< int >() == 42 );
TEST_ASSERT( pl->get_result().as< int >() == 42 );

tr->send( "SELECT 1701" );
tr->sync();
pl->send( "SELECT 1701" );
pl->sync();

TEST_ASSERT( tr->get_result().as< int >() == 1234 );
tr->consume_sync();
TEST_ASSERT( pl->get_result().as< int >() == 1234 );
pl->consume_sync();

TEST_ASSERT( tr->get_result().as< int >() == 1701 );
tr->consume_sync();
TEST_ASSERT( pl->get_result().as< int >() == 1701 );
pl->consume_sync();

tr->finish();
pl->finish();
}

{
auto tr = connection->transaction()->pipeline();
auto pl = connection->transaction()->pipeline();

tr->send( "SELECT 42" );
tr->send( "SELECT 1234" );
tr->sync();
pl->send( "SELECT 42" );
pl->send( "SELECT 1234" );
pl->sync();

TEST_ASSERT( tr->get_result().as< int >() == 42 );
TEST_ASSERT( pl->get_result().as< int >() == 42 );

tr->send( "SELECT 1701" );
tr->sync();
pl->send( "SELECT 1701" );
pl->sync();

TEST_ASSERT( tr->get_result().as< int >() == 1234 );
tr->consume_sync();
TEST_ASSERT( pl->get_result().as< int >() == 1234 );
pl->consume_sync();

TEST_ASSERT( tr->get_result().as< int >() == 1701 );
tr->consume_sync();
TEST_ASSERT( pl->get_result().as< int >() == 1701 );
pl->consume_sync();

tr->finish();
pl->finish();
}
}

Expand Down

0 comments on commit 9ff0bed

Please sign in to comment.