RE: Latest 2.15 snapshot breaks my unit tests

2015-03-04 Thread Steven Marcus

Hello,

The 2b0e1e2daa6cc160c6b3fbd4880d6002cf90f02d commit on 5Mar looks like it's
relevant to my issue.
I'll wait for the next snapshot to be published and test again.

Thanks,
Steven



--
View this message in context: 
http://camel.465427.n5.nabble.com/Latest-2-15-snapshot-breaks-my-unit-tests-tp5763432p5763604.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Latest 2.15 snapshot breaks my unit tests

2015-03-04 Thread Steven Marcus

https://issues.apache.org/jira/browse/CAMEL-8436
is tracking the spring-boot routes issue.

Thanks,



--
View this message in context: 
http://camel.465427.n5.nabble.com/Latest-2-15-snapshot-breaks-my-unit-tests-tp5763432p5763607.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Latest 2.15 snapshot breaks my unit tests

2015-03-03 Thread Steven Marcus

Hello,

I don't have the camel-scala component in my pom.xml -- although it is a
mixed language project with some Scala code.

So the breakage I reported in my unit/integration tests and in my app are
unrelated to 8427?

Thanks for the update though -- good to know.
Steven



--
View this message in context: 
http://camel.465427.n5.nabble.com/Latest-2-15-snapshot-breaks-my-unit-tests-tp5763432p5763521.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Latest 2.15 snapshot breaks my unit tests

2015-03-03 Thread Steven Marcus
Hello,

The code for one of the tests that broke is copied below.

The failure is at 
require(camelContext.hasEndpoint(PROBE_START) != null, PROBE_START) 
So it appears that FFProbeRouteTestConfig is not getting injected into the
context correctly/at the right time anymore. Works ok when I lock to the Feb
snapshot.

There is another test with a similar setup that fails.
And the app proper starts up ok, but some routes are not found/started.

Thanks again,
Steven


@RunWith(classOf[SpringJUnit4ClassRunner])
@SpringApplicationConfiguration(classes =
Array(classOf[FFProbeRouteTestConfig], classOf[TestApp]))
@IntegrationTest(Array(camel.springboot.jmxEnabled=false))
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
@Configuration
class FFProbeRouteTest extends JUnitSuite with TryValues with MockitoSugar
with StrictLogging {

  import FFProbeRouteTest._

  @Autowired var camelContext: CamelContext = _
  @Autowired var template: ProducerTemplate = _

  @Test def testFfProbe() {
require(camelContext != null, camelContext)
require(template != null, template)
require(camelContext.hasEndpoint(PROBE_START) != null, PROBE_START)
require(camelContext.hasEndpoint(PROBE_RESULT) != null, PROBE_RESULT)

val result = camelContext.getEndpoint(PROBE_RESULT,
classOf[MockEndpoint])
result.setExpectedMessageCount(1)

val path = ~/MR-assets0/DEV/unittest.mp4.toPath
template.sendBody(PROBE_START, path)

MockEndpoint.assertIsSatisfied(camelContext)

   
result.getExchanges.asScala.toList.last.getIn.getMandatoryBody(classOf[FFProbeInfo])
  }
}

object FFProbeRouteTest {
  val PROBE_START = direct:probeStart
  val PROBE_RESULT = mock:probeResult
}

@Configuration
class FFProbeRouteTestConfig {

  import FFProbeRouteTest._

  @Bean def ffprobeRouteTest(service: FFProbeService, ef: ExchangeFormatter)
= new RouteBuilder() {

override def configure(): Unit = {
  from(PROBE_START).
routeId(test_probe).
process(SyncRoutesConfiguration.probeProcessor(service, ef)).
to(log:ffprobeRouteTest?level=INFOshowAll=truemultiline=true).
to(PROBE_RESULT)
}
  }

}




--
View this message in context: 
http://camel.465427.n5.nabble.com/Latest-2-15-snapshot-breaks-my-unit-tests-tp5763432p5763526.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Latest 2.15 snapshot breaks my unit tests

2015-03-03 Thread Steven Marcus

My project is using 2.15 snapshot because it relies on the new
camel-spring-boot component.

The latest snapshot breaks both my unit tests and my app.
The latest snapshot isn't finding all my routes defined in @Configuration
classes.

I've had to revert and lock to 2.15-20150210.025549-156 for the time being,
which is working with spring-boot 1.2.2

TIA,
Steven








--
View this message in context: 
http://camel.465427.n5.nabble.com/Latest-2-15-snapshot-breaks-my-unit-tests-tp5763432p5763496.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: snapshots broken?

2015-02-20 Thread Steven Marcus

Thanks for the fast build tip.

I have 4 VMs that are all pulling 2.15-SNAPSHOT -- so if the remote repo is
updated regularly that would be great. What's the snapshot update policy?

Do I need to change the group id to use my own snapshot build of what is
usually a remotely fetched snapshot?
http://stackoverflow.com/questions/22015685/maven-3-does-not-update-snapshot-dependency-from-local-repository
-- lots of confusion there. I found the link after doing a local install and
the new snapshot not getting picked up...

Thanks again,



--
View this message in context: 
http://camel.465427.n5.nabble.com/snapshots-broken-tp5762959p5762971.html
Sent from the Camel - Users mailing list archive at Nabble.com.


snapshots broken?

2015-02-19 Thread Steven Marcus
Hello,

I'm keen to use some patches I've submitted, but as I write this there has
been an update to snapshots for 10 days:
https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-aws/2.15-SNAPSHOT/

Are snapshots created automatically and regularly?

TIA,
Steven




--
View this message in context: 
http://camel.465427.n5.nabble.com/snapshots-broken-tp5762959.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-boot autowiring issue

2015-01-06 Thread Steven Marcus
Hello,

Thanks for the sample project. I adapted it to experiment with
@EndpointInject and @Produces -- they appear to be broken with spring-boot?

The shouldInjectCamelContext() test fails with null for resultEndpoint --
and template is null too.
(Using recently updated camel-spring-boot SNAPSHOT.)

@BootstrapWith(CamelTestContextBootstrapper.class)
@Configuration
@ComponentScan
@EnableAutoConfiguration
@SpringApplicationConfiguration(classes = {CamelConfigurationTest.class,
MyCamelConfiguration.class})
@RunWith(CamelSpringJUnit4ClassRunner.class)
public class CamelConfigurationTest extends Assert {

@Autowired
CamelContext camelContext;

@Value(${name})
String name;
@Autowired
private CamelConfigurationProperties configurationProperties;
@Autowired
private Environment env;

@EndpointInject(uri = mock:result)
private MockEndpoint resultEndpoint;

@Produce(uri = direct:RoomSyncRouteTest)
private ProducerTemplate template;

@Test
public void shouldInjectCamelContext() {
assertNotNull(camelContext, camelContext);
assertNotNull(configurationProperties, configurationProperties);
assertNotNull(env, env);
assertNotNull(name, name);
assertNotNull(resultEndpoint, resultEndpoint);
assertNotNull(template, template);
}

@Test
public void shouldLoadRoute() {
assertEquals(1, camelContext.getRoutes().size());
}
}

Camel + spring boot looks like a great combo...

TIA!
Steven




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-boot-autowiring-issue-tp5758543p5761414.html
Sent from the Camel - Users mailing list archive at Nabble.com.