Milla
Milla

Reputation: 503

Apache camel test fails in project created with camel-archetype-blueprint

I want to add some tests to my camel project so I decided to create a clean project using maven and the camel-archetype-blueprint archetype to look at some samples.

Now I created the project using:

mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-blueprint -DarchetypeVersion=2.15.3 -DgroupId=de.test - DartifactId=Testing

but without editing anything the test fails by default with this exception (building it with mvn package):

java.lang.RuntimeException: InputStream cannot be null

Is there anything else I have to do to for those tests to run?

Upvotes: 2

Views: 520

Answers (2)

abarisone
abarisone

Reputation: 3783

I would suggest you to try with newly released 2.15.4 version, which seems to address the issue you reported.

See CAMEL-9142 report (taken from version 2.15.4 release notes) in order to have more information:

Looks like update CAMEL-8948 dropped support for multiple blueprint descriptors within CamelBlueprintTestSupport file within camel-test-blueprint component. The symptom is a 'java.lang.RuntimeException: InputStream cannot be null' for unit tests that have a getBlueprintDescriptor with multiple file references, i.e. a '+' concatenating two or more descriptor files.

Upvotes: 0

David
David

Reputation: 579

There appears to be a bug in the camel blueprint testing dependency for 2.15.3. If you change it to another version (I tried 2.12.2 and 2.15.2) it fixes the null input stream error.

<!-- Testing & Camel Plugin -->
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-test-blueprint</artifactId>
  <version>2.15.2</version>
  <scope>test</scope>
</dependency>

Upvotes: 2

Related Questions