Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul2393 committed Nov 14, 2024
1 parent 131966c commit 4fa9b28
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1729,10 +1729,13 @@ public void testSessionNotFoundPartitionedUpdate() {
SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName);
Statement statement = Statement.of("UPDATE FOO SET BAR=1 WHERE 1=1");
final SessionImpl closedSession = mockSession();
when(closedSession.executePartitionedUpdate(statement)).thenThrow(sessionNotFound);
when(closedSession.executePartitionedUpdate(any(Statement.class))).thenThrow(sessionNotFound);
when(closedSession.executePartitionedUpdate(any(Statement.class), any(), any()))
.thenThrow(sessionNotFound);

final SessionImpl openSession = mockSession();
when(openSession.executePartitionedUpdate(statement)).thenReturn(1L);
when(openSession.executePartitionedUpdate(any(Statement.class))).thenReturn(1L);
when(openSession.executePartitionedUpdate(any(Statement.class), any(), any())).thenReturn(1L);
doAnswer(
invocation -> {
executor.submit(
Expand Down

0 comments on commit 4fa9b28

Please sign in to comment.