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:
Martijn van Groningen 2015-06-25 00:36:47 +02:00
parent 193d8092db
commit 9cb7232075
1 changed files with 3 additions and 3 deletions

View File

@ -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();