Skip to content

Commit

Permalink
Encode the test url
Browse files Browse the repository at this point in the history
  • Loading branch information
VedarthConfluent authored and hrishabhg committed Dec 23, 2024
1 parent 600b73d commit dd790e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import io.vertx.ext.web.client.WebClientOptions;
import io.vertx.ext.web.codec.BodyCodec;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Base64;
Expand Down Expand Up @@ -567,7 +568,7 @@ public static List<String> makeWsRequest(
try {
httpClient = vertx.createHttpClient();

final String uri = baseUri.toString() + "/ws/query?request="
final String uri = URLEncoder.encode(baseUri.toString() + "/ws/query?request="
+ buildStreamingRequest(sql, overrides, requestProperties)
+ "&access_token=" + credentials.get().getAuthHeader().replace(" ", "%20");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.*;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;
import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage;

import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.*;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;
import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage;

import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -986,6 +987,7 @@ public void shouldSerializeMapOfStruct() {
ImmutableMap.of(new Utf8("k"), avroOrder),
MAP_VALUE_ORDER_AVRO_SCHEMA
);

final GenericArray<?> actual = deserialize(bytes);
assertThat(actual, is(expected));
}
Expand Down

0 comments on commit dd790e6

Please sign in to comment.