Skip to content

Commit

Permalink
clear http client
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-akolodziejczyk committed Dec 10, 2024
1 parent ca6e3d6 commit 8878f7b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import net.snowflake.client.category.TestTags;
import net.snowflake.client.core.HttpUtil;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
Expand All @@ -33,6 +35,11 @@ public void setUp() throws IOException {
authTest = new AuthTest();
}

@AfterEach
public void tearDown() {
HttpUtil.httpClient.clear();
}

@Test
void shouldAuthenticateUsingOauth() throws IOException {
authTest.connectAndExecuteSimpleQuery(getOauthConnectionParameters(getToken()), null);
Expand Down

0 comments on commit 8878f7b

Please sign in to comment.