File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
java-client/src/test/java/co/elastic/clients Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public class LoadingJsonTest extends ModelTestCase {
48
48
private DocTestsTransport transport = new DocTestsTransport ();
49
49
private ElasticsearchClient client = new ElasticsearchClient (transport );
50
50
51
- private static SearchResponse <JsonData > searchResponse = SearchResponse .searchResponseOf (b -> b
51
+ private static SearchResponse <JsonData > searchResponse = SearchResponse .of (b -> b
52
52
.aggregations (new HashMap <>())
53
53
.took (0 )
54
54
.timedOut (false )
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ private synchronized void setup() {
60
60
container = new ElasticsearchContainer ("docker.elastic.co/elasticsearch/elasticsearch:7.16.2" )
61
61
.withEnv ("ES_JAVA_OPTS" , "-Xms256m -Xmx256m" )
62
62
.withEnv ("path.repo" , "/tmp" ) // for snapshots
63
- .withStartupTimeout (Duration .ofSeconds (30 ))
63
+ .withStartupTimeout (Duration .ofSeconds (120 ))
64
64
.withPassword ("changeme" );
65
65
container .start ();
66
66
port = container .getMappedPort (9200 );
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void testObjectAndArrayPath() {
69
69
70
70
JsonpMappingException e = assertThrows (JsonpMappingException .class , () -> {
71
71
// withJson() will read values of the generic parameter type as JsonData
72
- SearchResponse <JsonData > r = SearchResponse .searchResponseOf (b -> b
72
+ SearchResponse <JsonData > r = SearchResponse .of (b -> b
73
73
.withJson (new StringReader (json ))
74
74
);
75
75
});
Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ public void testRequestWithGenericValueBody() {
52
52
@ Test
53
53
public void testRequestWithValueBody () {
54
54
String json = "{" +
55
- "\" analyze.max_token_count\" : 12" +
55
+ "\" analyze\" : {" +
56
+ " \" max_token_count\" : 12" +
57
+ " }" +
56
58
"}" ;
57
59
58
60
PutIndicesSettingsRequest req = PutIndicesSettingsRequest .of (b -> b
59
61
.withJson (new StringReader (json ))
60
62
);
61
63
62
- assertEquals (12 , req .settings ().analyzeMaxTokenCount ().intValue ());
64
+ assertEquals (12 , req .settings ().analyze (). maxTokenCount ().intValue ());
63
65
}
64
66
65
67
@ Test
@@ -108,7 +110,7 @@ public void testObjectWithGenericParam() {
108
110
"}" ;
109
111
110
112
// withJson() will read values of the generic parameter type as JsonData
111
- SearchResponse <JsonData > r = SearchResponse .searchResponseOf (b -> b
113
+ SearchResponse <JsonData > r = SearchResponse .of (b -> b
112
114
.withJson (new StringReader (json ))
113
115
);
114
116
You can’t perform that action at this time.
0 commit comments