File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/test/java/ru/yandex/clickhouse/util Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 55import org .apache .http .client .methods .HttpPost ;
66import org .apache .http .conn .HttpHostConnectException ;
77import org .apache .http .impl .client .CloseableHttpClient ;
8+ import org .apache .http .protocol .BasicHttpContext ;
9+ import org .apache .http .protocol .HttpContext ;
810import org .testng .annotations .AfterClass ;
911import org .testng .annotations .AfterMethod ;
1012import org .testng .annotations .BeforeClass ;
@@ -199,12 +201,14 @@ public void testWithRetry() throws Exception {
199201 // props.setMaxRetries(3);
200202 ClickHouseHttpClientBuilder builder = new ClickHouseHttpClientBuilder (props );
201203 CloseableHttpClient client = builder .buildClient ();
204+ HttpContext context = new BasicHttpContext ();
205+ context .setAttribute ("is_idempotent" , Boolean .TRUE );
202206 HttpPost post = new HttpPost ("http://localhost:" + server .port () + "/?db=system&query=select%202" );
203-
207+
204208 shutDownServerWithDelay (server , 100 );
205209
206210 try {
207- client .execute (post );
211+ client .execute (post , context );
208212 } finally {
209213 client .close ();
210214 }
You can’t perform that action at this time.
0 commit comments