org.elasticsearch.test.StreamsUtils Java Examples
The following examples show how to use
org.elasticsearch.test.StreamsUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: URLAnalysisTestCase.java From elasticsearch-analysis-url with Apache License 2.0 | 5 votes |
/** * For subclasses to override. Overrides must call {@code super.setUp()}. */ @Before @Override public void setUp() throws Exception { super.setUp(); String settings = StreamsUtils.copyToStringFromClasspath("/test-settings.json"); String mapping = StreamsUtils.copyToStringFromClasspath("/test-mapping.json"); client().admin().indices().prepareCreate(INDEX).setSettings(settings).addMapping(TYPE, mapping).get(); refresh(); Thread.sleep(75); // Ensure that the shard is available before we start making analyze requests. }