Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0192ED0FC for ; Sun, 10 Feb 2013 15:32:45 +0000 (UTC) Received: (qmail 72727 invoked by uid 500); 10 Feb 2013 15:32:44 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 72695 invoked by uid 500); 10 Feb 2013 15:32:44 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 72683 invoked by uid 99); 10 Feb 2013 15:32:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2013 15:32:44 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of raul@evosent.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2013 15:32:35 +0000 Received: by mail-ie0-f176.google.com with SMTP id k13so6738111iea.35 for ; Sun, 10 Feb 2013 07:32:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type:x-gm-message-state; bh=qu7ebfnbvqHeSYoOC8dABh4OqjSZuA7GFnnR4jZQVSo=; b=Jc/VB6uoI3bobxXLzyPVmeF54YXL5i/u+ldgQqjceJoTZ6KNgLKXQBh7IUK+G3XbV9 ySWniXD0xg6bKaj2ljZxwsOhUIOY4EQEhumgqNpDzsoQvtjgSm4DYy9buecUIGH4tWXx q/HhlWNV82V3JwcignRZMe+5+dT8duboTEFp4O46Xn951NsRw2I76lc2b/rIaz9dENnX fhTPxItY1yR5aD0elT4RBJwnOCzW6qioBOl2oJUgyu3chpDAacUtmW64pUlZLjP/FlEF UMJzeRJ8QReR6A7k0rbIbkr3p5uwg+7wY/hZr7r6zS0RyuQwgQKSCdLiGSQEEa1BqGZE BEdA== MIME-Version: 1.0 X-Received: by 10.50.216.231 with SMTP id ot7mr10079654igc.2.1360510334333; Sun, 10 Feb 2013 07:32:14 -0800 (PST) Received: by 10.64.68.48 with HTTP; Sun, 10 Feb 2013 07:32:14 -0800 (PST) X-Originating-IP: [2.139.59.216] Received: by 10.64.68.48 with HTTP; Sun, 10 Feb 2013 07:32:14 -0800 (PST) In-Reply-To: References: <1360507275427-5727302.post@n5.nabble.com> Date: Sun, 10 Feb 2013 15:32:14 +0000 Message-ID: Subject: Re: disable timer for unit tests From: Raul Kripalani To: users@camel.apache.org Content-Type: multipart/alternative; boundary=14dae93406cd30f37104d5607faa X-Gm-Message-State: ALoCoQmZUA/0RCPr1grjRlS9CwqMppVBV2an3I70qpOSzmuvK3J3Svt3U6QtzPMgpmY1ODXzw7P0 X-Virus-Checked: Checked by ClamAV on apache.org --14dae93406cd30f37104d5607faa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Identify the timer-based route with an explicit routeId: from("timer:...").routeId("timed-route")... And then stop it explicitly from your test code: context.stopRoute("timed-route"); Alternatively, you could disable autostart for that route altogether, but then you have to start it manually for production usage. Or use a system property to control the behaviour per environment. See http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.= html. Hope that helps, Ra=FAl. On 10 Feb 2013 14:41, "martin11" wrote: Hello, I use Camel ver. 2.10.1 and in production context I use timers (cca 10sec.) to create an event on route. I also create unit tests (extended from CamelSpringTestSupport) for my production context to make tests on individual routes. When I run my tests, timers expires and start new route. Because it is only test, than I don`t have a connection to external endpoints (database, LDAP, etc..) and it cause exceptions in log file. Of course it does not affect result of my test, but logs are unobvious. How can I disable timers inside production context when running unit tests? Thanks for any advice! -- View this message in context: http://camel.465427.n5.nabble.com/disable-timer-for-unit-tests-tp5727302.ht= ml Sent from the Camel - Users mailing list archive at Nabble.com. --14dae93406cd30f37104d5607faa--