切换连接到多 es 集群。
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.gzzn.omms.msgexchangeapi.elasticsearch;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class ElasticsearchUtilTest {
|
||||
|
||||
@Autowired
|
||||
private ElasticsearchUtil elasticsearchUtil;
|
||||
|
||||
@Test
|
||||
public void testCreateIndex()
|
||||
{
|
||||
elasticsearchUtil.createIndex("testindex");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDeleteIndex()
|
||||
{
|
||||
elasticsearchUtil.deleteIndex("testindex");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user