-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
124 additions
and
0 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
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
23 changes: 23 additions & 0 deletions
23
...cr/src/test/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexRequestTests.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,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
package org.elasticsearch.xpack.ccr.action; | ||
|
||
import org.elasticsearch.test.AbstractStreamableTestCase; | ||
|
||
public class CreateAndFollowIndexRequestTests extends AbstractStreamableTestCase<CreateAndFollowIndexAction.Request> { | ||
|
||
@Override | ||
protected CreateAndFollowIndexAction.Request createBlankInstance() { | ||
return new CreateAndFollowIndexAction.Request(); | ||
} | ||
|
||
@Override | ||
protected CreateAndFollowIndexAction.Request createTestInstance() { | ||
CreateAndFollowIndexAction.Request request = new CreateAndFollowIndexAction.Request(); | ||
request.setFollowRequest(FollowIndexRequestTests.createTestRequest()); | ||
return request; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...r/src/test/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexResponseTests.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,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
package org.elasticsearch.xpack.ccr.action; | ||
|
||
import org.elasticsearch.test.AbstractStreamableTestCase; | ||
|
||
public class CreateAndFollowIndexResponseTests extends AbstractStreamableTestCase<CreateAndFollowIndexAction.Response> { | ||
|
||
@Override | ||
protected CreateAndFollowIndexAction.Response createBlankInstance() { | ||
return new CreateAndFollowIndexAction.Response(); | ||
} | ||
|
||
@Override | ||
protected CreateAndFollowIndexAction.Response createTestInstance() { | ||
return new CreateAndFollowIndexAction.Response(randomBoolean(), randomBoolean(), randomBoolean()); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
.../plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/FollowIndexRequestTests.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,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
package org.elasticsearch.xpack.ccr.action; | ||
|
||
import org.elasticsearch.test.AbstractStreamableTestCase; | ||
|
||
public class FollowIndexRequestTests extends AbstractStreamableTestCase<FollowIndexAction.Request> { | ||
|
||
@Override | ||
protected FollowIndexAction.Request createBlankInstance() { | ||
return new FollowIndexAction.Request(); | ||
} | ||
|
||
@Override | ||
protected FollowIndexAction.Request createTestInstance() { | ||
return createTestRequest(); | ||
} | ||
|
||
static FollowIndexAction.Request createTestRequest() { | ||
FollowIndexAction.Request request = new FollowIndexAction.Request(); | ||
request.setLeaderIndex(randomAlphaOfLength(4)); | ||
request.setFollowIndex(randomAlphaOfLength(4)); | ||
request.setBatchSize(randomNonNegativeLong()); | ||
request.setConcurrentProcessors(randomIntBetween(0, Integer.MAX_VALUE)); | ||
request.setProcessorMaxTranslogBytes(randomNonNegativeLong()); | ||
return request; | ||
} | ||
} |