test: Use utc time to create index name in test, since that is what internally is used too.
Original commit: elastic/x-pack-elasticsearch@48f300f657
This commit is contained in:
parent
193d8092db
commit
9cb7232075
|
@ -62,7 +62,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration
|
|||
|
||||
assertWatchWithMinimumPerformedActionsCount("_id", 1, false);
|
||||
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now());
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC());
|
||||
logger.info("checking index [{}]", indexName);
|
||||
assertBusy(new Runnable() {
|
||||
@Override
|
||||
|
@ -77,7 +77,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration
|
|||
|
||||
@Test
|
||||
public void testDynamicIndexSearchInput() throws Exception {
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now());
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC());
|
||||
createIndex(indexName);
|
||||
index(indexName, "type", "1", "key", "value");
|
||||
flush();
|
||||
|
@ -102,7 +102,7 @@ public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegration
|
|||
|
||||
@Test
|
||||
public void testDynamicIndexSearchTransform() throws Exception {
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().now());
|
||||
final String indexName = "idx-" + DateTimeFormat.forPattern("YYYY.MM.dd").print(timeWarp().clock().nowUTC());
|
||||
createIndex(indexName);
|
||||
index(indexName, "type", "1", "key", "value");
|
||||
flush();
|
||||
|
|
Loading…
Reference in New Issue