SolrAutoConfigurationTest.java
/*******************************************************************************
* Copyright (c) 2025 Eclipse RDF4J contributors.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Some portions generated by Codex
package org.eclipse.rdf4j.server.boot;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.apache.solr.client.solrj.SolrClient;
import org.eclipse.rdf4j.tools.serverboot.Rdf4jServerWorkbenchApplication;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
@SpringBootTest(classes = Rdf4jServerWorkbenchApplication.class, webEnvironment = SpringBootTest.WebEnvironment.NONE)
class SolrAutoConfigurationTest {
@Autowired
private ApplicationContext applicationContext;
@Test
void solrClientBeanNotPresentByDefault() {
assertThatThrownBy(() -> applicationContext.getBean(SolrClient.class))
.isInstanceOf(NoSuchBeanDefinitionException.class);
}
}