Skip to content

Commit b4fd22c

Browse files
algolia-botmillotp
andcommitted
chore(cts): remove flaky test (#3448) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent da28464 commit b4fd22c

File tree

10 files changed

+0
-194
lines changed

10 files changed

+0
-194
lines changed

tests/output/csharp/src/generated/requests/Analytics.test.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,30 +1510,6 @@ await client.GetTopSearchesAsync(
15101510
}
15111511
}
15121512

1513-
[Fact(DisplayName = "e2e with complex query params")]
1514-
public async Task GetTopSearchesTest2()
1515-
{
1516-
await client.GetTopSearchesAsync("cts_e2e_space in index");
1517-
1518-
var req = _echo.LastResponse;
1519-
Assert.Equal("/2/searches", req.Path);
1520-
Assert.Equal("GET", req.Method.ToString());
1521-
Assert.Null(req.Body);
1522-
var expectedQuery = JsonSerializer.Deserialize<Dictionary<string, string>>(
1523-
"{\"index\":\"cts_e2e_space%20in%20index\"}"
1524-
);
1525-
Assert.NotNull(expectedQuery);
1526-
1527-
var actualQuery = req.QueryParameters;
1528-
Assert.Equal(expectedQuery.Count, actualQuery.Count);
1529-
1530-
foreach (var actual in actualQuery)
1531-
{
1532-
expectedQuery.TryGetValue(actual.Key, out var expected);
1533-
Assert.Equal(expected, actual.Value);
1534-
}
1535-
}
1536-
15371513
[Fact(DisplayName = "get getUsersCount with minimal parameters")]
15381514
public async Task GetUsersCountTest()
15391515
{

tests/output/go/tests/requests/analytics_test.go

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/output/java/src/test/java/com/algolia/requests/Analytics.test.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,33 +1538,6 @@ void getTopSearchesTest1() {
15381538
}
15391539
}
15401540

1541-
@Test
1542-
@DisplayName("e2e with complex query params")
1543-
void getTopSearchesTest2() {
1544-
assertDoesNotThrow(() -> {
1545-
client.getTopSearches("cts_e2e_space in index");
1546-
});
1547-
EchoResponse req = echo.getLastResponse();
1548-
assertEquals("/2/searches", req.path);
1549-
assertEquals("GET", req.method);
1550-
assertNull(req.body);
1551-
1552-
try {
1553-
Map<String, String> expectedQuery = json.readValue(
1554-
"{\"index\":\"cts_e2e_space%20in%20index\"}",
1555-
new TypeReference<HashMap<String, String>>() {}
1556-
);
1557-
Map<String, Object> actualQuery = req.queryParameters;
1558-
1559-
assertEquals(expectedQuery.size(), actualQuery.size());
1560-
for (Map.Entry<String, Object> p : actualQuery.entrySet()) {
1561-
assertEquals(expectedQuery.get(p.getKey()), p.getValue());
1562-
}
1563-
} catch (JsonProcessingException e) {
1564-
fail("failed to parse queryParameters json");
1565-
}
1566-
}
1567-
15681541
@Test
15691542
@DisplayName("get getUsersCount with minimal parameters")
15701543
void getUsersCountTest() {

tests/output/javascript/src/requests/analytics.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,19 +1003,6 @@ describe('getTopSearches', () => {
10031003
tags: 'tag',
10041004
});
10051005
});
1006-
1007-
test('e2e with complex query params', async () => {
1008-
const req = (await client.getTopSearches({
1009-
index: 'cts_e2e_space in index',
1010-
})) as unknown as EchoResponse;
1011-
1012-
expect(req.path).toEqual('/2/searches');
1013-
expect(req.method).toEqual('GET');
1014-
expect(req.data).toEqual(undefined);
1015-
expect(req.searchParams).toStrictEqual({
1016-
index: 'cts_e2e_space%20in%20index',
1017-
});
1018-
});
10191006
});
10201007

10211008
describe('getUsersCount', () => {

tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/AnalyticsTest.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,23 +1257,6 @@ class AnalyticsTest {
12571257
)
12581258
}
12591259

1260-
@Test
1261-
fun `e2e with complex query params2`() = runTest {
1262-
client.runTest(
1263-
call = {
1264-
getTopSearches(
1265-
index = "cts_e2e_space in index",
1266-
)
1267-
},
1268-
intercept = {
1269-
assertEquals("/2/searches".toPathSegments(), it.url.pathSegments)
1270-
assertEquals(HttpMethod.parse("GET"), it.method)
1271-
assertQueryParams("""{"index":"cts_e2e_space%20in%20index"}""", it.url.encodedParameters)
1272-
assertNoBody(it.body)
1273-
},
1274-
)
1275-
}
1276-
12771260
// getUsersCount
12781261

12791262
@Test

tests/output/php/src/requests/AnalyticsTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,24 +1254,6 @@ public function testGetTopSearches1()
12541254
]);
12551255
}
12561256

1257-
#[TestDox('e2e with complex query params')]
1258-
public function testGetTopSearches2()
1259-
{
1260-
$client = $this->getClient();
1261-
$client->getTopSearches(
1262-
'cts_e2e_space in index',
1263-
);
1264-
1265-
$this->assertRequests([
1266-
[
1267-
'path' => '/2/searches',
1268-
'method' => 'GET',
1269-
'body' => null,
1270-
'queryParameters' => json_decode('{"index":"cts_e2e_space%20in%20index"}', true),
1271-
],
1272-
]);
1273-
}
1274-
12751257
#[TestDox('get getUsersCount with minimal parameters')]
12761258
public function testGetUsersCount()
12771259
{

tests/output/python/tests/requests/analytics_test.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,23 +1215,6 @@ async def test_get_top_searches_1(self):
12151215
assert _req.headers.items() >= {}.items()
12161216
assert _req.data is None
12171217

1218-
async def test_get_top_searches_2(self):
1219-
"""
1220-
e2e with complex query params
1221-
"""
1222-
_req = await self._client.get_top_searches_with_http_info(
1223-
index="cts_e2e_space in index",
1224-
)
1225-
1226-
assert _req.path == "/2/searches"
1227-
assert _req.verb == "GET"
1228-
assert (
1229-
_req.query_parameters.items()
1230-
== {"index": "cts_e2e_space%20in%20index"}.items()
1231-
)
1232-
assert _req.headers.items() >= {}.items()
1233-
assert _req.data is None
1234-
12351218
async def test_get_users_count_(self):
12361219
"""
12371220
get getUsersCount with minimal parameters

tests/output/ruby/test/requests/analytics_test.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -937,18 +937,6 @@ def test_get_top_searches1
937937
assert(req.body.nil?, "body is not nil")
938938
end
939939

940-
# e2e with complex query params
941-
def test_get_top_searches2
942-
req = @client.get_top_searches_with_http_info("cts_e2e_space in index")
943-
944-
assert_equal(:get, req.method)
945-
assert_equal("/2/searches", req.path)
946-
assert_equal({:"index" => "cts_e2e_space%20in%20index"}.to_a, req.query_params.to_a)
947-
assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s)
948-
949-
assert(req.body.nil?, "body is not nil")
950-
end
951-
952940
# get getUsersCount with minimal parameters
953941
def test_get_users_count
954942
req = @client.get_users_count_with_http_info("index")

tests/output/scala/src/test/scala/algoliasearch/requests/AnalyticsTest.scala

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,27 +1474,6 @@ class AnalyticsTest extends AnyFunSuite {
14741474
}
14751475
}
14761476

1477-
test("e2e with complex query params2") {
1478-
val (client, echo) = testClient()
1479-
val future = client.getTopSearches(
1480-
index = "cts_e2e_space in index"
1481-
)
1482-
1483-
Await.ready(future, Duration.Inf)
1484-
val res = echo.lastResponse.get
1485-
1486-
assert(res.path == "/2/searches")
1487-
assert(res.method == "GET")
1488-
assert(res.body.isEmpty)
1489-
val expectedQuery = parse("""{"index":"cts_e2e_space%20in%20index"}""").asInstanceOf[JObject].obj.toMap
1490-
val actualQuery = res.queryParameters
1491-
assert(actualQuery.size == expectedQuery.size)
1492-
for ((k, v) <- actualQuery) {
1493-
assert(expectedQuery.contains(k))
1494-
assert(expectedQuery(k).values == v)
1495-
}
1496-
}
1497-
14981477
test("get getUsersCount with minimal parameters") {
14991478
val (client, echo) = testClient()
15001479
val future = client.getUsersCount(

tests/output/swift/Tests/requests/AnalyticsTests.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,34 +1997,6 @@ final class AnalyticsClientRequestsTests: XCTestCase {
19971997
XCTAssertEqual(echoResponse.queryParameters, expectedQueryParametersMap)
19981998
}
19991999

2000-
/// e2e with complex query params
2001-
func testGetTopSearchesTest2() async throws {
2002-
let configuration = try AnalyticsClientConfiguration(
2003-
appID: AnalyticsClientRequestsTests.APPLICATION_ID,
2004-
apiKey: AnalyticsClientRequestsTests.API_KEY,
2005-
region: Region.us
2006-
)
2007-
let transporter = Transporter(configuration: configuration, requestBuilder: EchoRequestBuilder())
2008-
let client = AnalyticsClient(configuration: configuration, transporter: transporter)
2009-
2010-
let response = try await client.getTopSearchesWithHTTPInfo(index: "cts_e2e_space in index")
2011-
let responseBodyData = try XCTUnwrap(response.bodyData)
2012-
let echoResponse = try CodableHelper.jsonDecoder.decode(EchoResponse.self, from: responseBodyData)
2013-
2014-
XCTAssertNil(echoResponse.originalBodyData)
2015-
2016-
XCTAssertEqual(echoResponse.path, "/2/searches")
2017-
XCTAssertEqual(echoResponse.method, HTTPMethod.get)
2018-
2019-
let expectedQueryParameters = try XCTUnwrap("{\"index\":\"cts_e2e_space%20in%20index\"}".data(using: .utf8))
2020-
let expectedQueryParametersMap = try CodableHelper.jsonDecoder.decode(
2021-
[String: String?].self,
2022-
from: expectedQueryParameters
2023-
)
2024-
2025-
XCTAssertEqual(echoResponse.queryParameters, expectedQueryParametersMap)
2026-
}
2027-
20282000
/// get getUsersCount with minimal parameters
20292001
func testGetUsersCountTest() async throws {
20302002
let configuration = try AnalyticsClientConfiguration(

0 commit comments

Comments
 (0)