forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into poc_mark_read_only
- Loading branch information
Showing
47 changed files
with
723 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119580 | ||
summary: Do not serialize `EsIndex` in plan | ||
area: ES|QL | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...src/main21/java/org/elasticsearch/entitlement/qa/common/VersionSpecificNetworkChecks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.entitlement.qa.common; | ||
|
||
import java.io.IOException; | ||
import java.net.URI; | ||
import java.net.http.HttpClient; | ||
import java.net.http.HttpRequest; | ||
import java.net.http.HttpResponse; | ||
import java.net.spi.InetAddressResolver; | ||
import java.net.spi.InetAddressResolverProvider; | ||
|
||
class VersionSpecificNetworkChecks { | ||
static void createInetAddressResolverProvider() { | ||
var x = new InetAddressResolverProvider() { | ||
@Override | ||
public InetAddressResolver get(Configuration configuration) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return "TEST"; | ||
} | ||
}; | ||
} | ||
|
||
static void httpClientSend() throws InterruptedException { | ||
try (HttpClient httpClient = HttpClient.newBuilder().build()) { | ||
// Shutdown the client, so the send action will shortcut before actually executing any network operation | ||
// (but after it run our check in the prologue) | ||
httpClient.shutdown(); | ||
try { | ||
httpClient.send(HttpRequest.newBuilder(URI.create("http://localhost")).build(), HttpResponse.BodyHandlers.discarding()); | ||
} catch (IOException e) { | ||
// Expected, since we shut down the client | ||
} | ||
} | ||
} | ||
|
||
static void httpClientSendAsync() { | ||
try (HttpClient httpClient = HttpClient.newBuilder().build()) { | ||
// Shutdown the client, so the send action will return before actually executing any network operation | ||
// (but after it run our check in the prologue) | ||
httpClient.shutdown(); | ||
var future = httpClient.sendAsync( | ||
HttpRequest.newBuilder(URI.create("http://localhost")).build(), | ||
HttpResponse.BodyHandlers.discarding() | ||
); | ||
assert future.isCompletedExceptionally(); | ||
future.exceptionally(ex -> { | ||
assert ex instanceof IOException; | ||
return null; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.