Yaylı önyükleme entegrasyon testine katıştırılmış elasticsearch eklemenin yolunu arıyorum.Elasticsearch Yay önyükleme entegrasyonu testi
Elastik arama entegrasyon testine baktım ama her ikisi de farklı test koşucusu kullanması gerektiği için bahar botu ile birlikte çalışmıyor.
Ben maalesef hata ile çalışmaz aşağıda bir sınıf testi:java.lang.IllegalStateException: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = App.class)
@WebAppConfiguration
@IntegrationTest("server.port:0")
public class TestExample extends ElasticsearchIntegrationTest {
TestRestTemplate testRestTemplate = new TestRestTemplate();
@Value("${local.server.port}")
int port;
@Test
public void testOne(){
ResponseEntity<String> results = testRestTemplate.getForEntity(String.format("http://localhost:%d/client/1", port), String.class);
System.out.print(results);
}
}
mu herkes bazı fikirler vardır nasıl bunları yayınlayıp veya alternatifler nedir yapmak ??
nasıl Abo ut: https://github.com/spring-projects/spring-boot/blob/master/spring-boot-samples/spring-boot-sample-data-elasticsearch/? – Val
Bunu zaten gördüm. İlk olarak bahar verilerini kullanmıyorum, ikinci olarak ES'nin gömülü versiyonuna ihtiyacım var. –