Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ void tearDown() {

private GoogleVertexAIProducer producer(String query) throws Exception {
context = new DefaultCamelContext();
context.start();
GoogleVertexAIEndpoint endpoint = context.getEndpoint(BASE + query, GoogleVertexAIEndpoint.class);
// the endpoint is deliberately created without starting it: starting it builds the Vertex AI client,
// which looks up Application Default Credentials and fails wherever none are configured
GoogleVertexAIComponent component = context.getComponent("google-vertexai", GoogleVertexAIComponent.class);
GoogleVertexAIEndpoint endpoint = (GoogleVertexAIEndpoint) component.createEndpoint(BASE + query);
return new GoogleVertexAIProducer(endpoint);
}

Expand Down