Skip to content

Commit

Permalink
Merge with main
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Aug 2, 2024
1 parent 383fa83 commit dd8e7c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void setUp() throws Exception {
super.setUp();
this.bulkClient = new MockBulkClient(getTestName(), CALLS_TO_FAIL);
// Stash some random headers so we can assert that we preserve them
// bulkClient.threadPool().getThreadContext().stashContext();
bulkClient.threadPool().getThreadContext().stashContext();
expectedHeaders.clear();
expectedHeaders.put(randomAlphaOfLength(5), randomAlphaOfLength(5));
bulkClient.threadPool().getThreadContext().putHeader(expectedHeaders);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public void testPreservesThreadsOriginalContextOnRunException() throws IOExcepti

@Override
public void onAfter() {
assertTrue(threadContext.isSystemContext());
assertEquals(systemContext, threadContext.isSystemContext());
assertEquals("bar", threadContext.getHeader("foo"));
assertEquals("bar_transient", threadContext.getTransient("foo"));
assertNotNull(threadContext.getTransient("failure"));
Expand All @@ -595,7 +595,7 @@ public void onAfter() {

@Override
public void onFailure(Exception e) {
assertTrue(threadContext.isSystemContext());
assertEquals(systemContext, threadContext.isSystemContext());
assertEquals("exception from doRun", e.getMessage());
assertEquals("bar", threadContext.getHeader("foo"));
assertEquals("bar_transient", threadContext.getTransient("foo"));
Expand All @@ -605,7 +605,7 @@ public void onFailure(Exception e) {

@Override
protected void doRun() throws Exception {
assertTrue(threadContext.isSystemContext());
assertEquals(systemContext, threadContext.isSystemContext());
assertEquals("bar", threadContext.getHeader("foo"));
assertEquals("bar_transient", threadContext.getTransient("foo"));
assertFalse(threadContext.isDefaultContext());
Expand Down

0 comments on commit dd8e7c3

Please sign in to comment.