File tree Expand file tree Collapse file tree 4 files changed +19
-15
lines changed
test/framework/src/main/java/org/elasticsearch/test
qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference
src/yamlRestTest/java/org/elasticsearch/xpack/inference Expand file tree Collapse file tree 4 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -73,15 +73,6 @@ tests:
73
73
- class : org.elasticsearch.xpack.apmdata.APMYamlTestSuiteIT
74
74
method : test {yaml=/10_apm/Test template reinstallation}
75
75
issue : https://github.com/elastic/elasticsearch/issues/116445
76
- - class : org.elasticsearch.xpack.inference.InferenceRestIT
77
- method : test {p0=inference/40_semantic_text_query/Query a field that uses the default ELSER 2 endpoint}
78
- issue : https://github.com/elastic/elasticsearch/issues/117027
79
- - class : org.elasticsearch.xpack.inference.InferenceRestIT
80
- method : test {p0=inference/30_semantic_text_inference/Calculates embeddings using the default ELSER 2 endpoint}
81
- issue : https://github.com/elastic/elasticsearch/issues/117349
82
- - class : org.elasticsearch.xpack.inference.InferenceRestIT
83
- method : test {p0=inference/30_semantic_text_inference_bwc/Calculates embeddings using the default ELSER 2 endpoint}
84
- issue : https://github.com/elastic/elasticsearch/issues/117349
85
76
- class : org.elasticsearch.xpack.test.rest.XPackRestIT
86
77
method : test {p0=transform/transforms_reset/Test reset running transform}
87
78
issue : https://github.com/elastic/elasticsearch/issues/117473
Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
- * or more contributor license agreements. Licensed under the Elastic License
4
- * 2.0; you may not use this file except in compliance with the Elastic License
5
- * 2.0.
3
+ * or more contributor license agreements. Licensed under the "Elastic License
4
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5
+ * Public License v 1"; you may not use this file except in compliance with, at
6
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
7
+ * License v3.0 only", or the "Server Side Public License, v 1".
6
8
*/
7
9
8
- package org .elasticsearch .xpack . inference ;
10
+ package org .elasticsearch .test ;
9
11
10
12
import org .apache .logging .log4j .LogManager ;
11
13
import org .apache .logging .log4j .Logger ;
25
27
* <br/>
26
28
* <code>public RetryRule retry = new RetryRule(3, TimeValue.timeValueSeconds(1));</code>
27
29
* <br/>
28
- * See {@link InferenceGetServicesIT#retry} for an example.
29
30
*/
30
31
public class RetryRule implements TestRule {
31
32
private static final Logger logger = LogManager .getLogger (RetryRule .class );
Original file line number Diff line number Diff line change 13
13
import org .elasticsearch .common .settings .Settings ;
14
14
import org .elasticsearch .common .util .concurrent .ThreadContext ;
15
15
import org .elasticsearch .core .TimeValue ;
16
+ import org .elasticsearch .test .RetryRule ;
16
17
import org .elasticsearch .test .cluster .ElasticsearchCluster ;
17
18
import org .elasticsearch .test .cluster .local .distribution .DistributionType ;
18
19
import org .elasticsearch .test .rest .ESRestTestCase ;
@@ -54,7 +55,7 @@ public class BaseMockEISAuthServerTest extends ESRestTestCase {
54
55
55
56
// The reason we're retrying is there's a race condition between the node retrieving the
56
57
// authorization response and running the test. Retrieving the authorization should be very fast since
57
- // we're hosting a local mock server but it's possible it could respond slower. So in the even of a test failure
58
+ // we're hosting a local mock server but it's possible it could respond slower. So in the event of a test failure
58
59
// we'll automatically retry after waiting a second.
59
60
// Note: @Rule is executed for each test
60
61
@ Rule
Original file line number Diff line number Diff line change 12
12
import org .elasticsearch .client .Request ;
13
13
import org .elasticsearch .common .Strings ;
14
14
import org .elasticsearch .common .settings .Settings ;
15
+ import org .elasticsearch .core .TimeValue ;
16
+ import org .elasticsearch .test .RetryRule ;
15
17
import org .elasticsearch .test .cluster .ElasticsearchCluster ;
16
18
import org .elasticsearch .test .cluster .FeatureFlag ;
17
19
import org .elasticsearch .test .cluster .local .distribution .DistributionType ;
18
20
import org .elasticsearch .test .rest .yaml .ClientYamlTestCandidate ;
19
21
import org .elasticsearch .test .rest .yaml .ESClientYamlSuiteTestCase ;
20
22
import org .junit .After ;
21
23
import org .junit .ClassRule ;
24
+ import org .junit .Rule ;
22
25
23
26
import java .io .IOException ;
24
27
import java .util .List ;
@@ -37,6 +40,14 @@ public class InferenceRestIT extends ESClientYamlSuiteTestCase {
37
40
.distribution (DistributionType .DEFAULT )
38
41
.build ();
39
42
43
+ /**
44
+ * This will retry a failed test up to 3 times with a 1 second wait between retries. We've observed transient network
45
+ * failures when trying to download the elser model during the test. These network failure cause the tests to fail intermittently.
46
+ * The proper way to fix this would be to add retry logic to the download code but that is a larger fix.
47
+ */
48
+ @ Rule
49
+ public RetryRule retryRule = new RetryRule (3 , TimeValue .timeValueSeconds (1 ));
50
+
40
51
public InferenceRestIT (final ClientYamlTestCandidate testCandidate ) {
41
52
super (testCandidate );
42
53
}
You can’t perform that action at this time.
0 commit comments