Should I create an JIRA issue for every commit?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Should I create an JIRA issue for every commit?

RomKal
The question is like in the subject: Should I create a JIRA issue for
everything that I change, or not?

As an example of such 'simple' change lets look at my forwarded commit.

Roman

---------- Forwarded message ----------
From: [hidden email] <[hidden email]>
Date: 21-01-2008 21:56
Subject: svn commit: r614007 - in
/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel:
ContextTestSupport.java ExchangeTestSupport.java
model/XmlTestSupport.java
To: [hidden email]


Author: romkal
Date: Mon Jan 21 12:56:08 2008
New Revision: 614007

URL: http://svn.apache.org/viewvc?rev=614007&view=rev
Log:
ContextTestSupport supports many RouteBuilders to be tested
Tests without test methods made abstract so eclipse doesn't complain
when executing them

Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
Mon Jan 21 12:56:08 2008
@@ -24,6 +24,7 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.processor.CreateRouteWithNonExistingEndpointTest;
 import org.apache.camel.spi.Language;
 import org.apache.camel.util.jndi.JndiTest;

@@ -68,9 +69,11 @@
         template = new CamelTemplate<Exchange>(context);

         if (useRouteBuilder) {
-            RouteBuilder builder = createRouteBuilder();
-            log.debug("Using created route builder: " + builder);
-            context.addRoutes(builder);
+            RouteBuilder[] builders = createRouteBuilders();
+            for (RouteBuilder builder : builders) {
+                log.debug("Using created route builder: " + builder);
+                context.addRoutes(builder);
+            }
         }
         else {
             log.debug("Using route builder from the created context:
" + context);
@@ -138,6 +141,16 @@
         };
     }

+    /**
+     * Factory method which derived classes can use to create an array of
+     * {@link RouteBuilder}s to define the routes for testing
+     *
+     * @see #createRouteBuilder()
+     */
+    protected RouteBuilder[] createRouteBuilders() throws Exception {
+        return new RouteBuilder[] {createRouteBuilder()};
+    }
+
     /**
      * Resolves a mandatory endpoint for the given URI or an
exception is thrown
      *

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java
Mon Jan 21 12:56:08 2008
@@ -25,7 +25,7 @@
  *
  * @version $Revision: 1.1 $
  */
-public class ExchangeTestSupport extends ContextTestSupport {
+public abstract class ExchangeTestSupport extends ContextTestSupport {
     protected Exchange exchange;

     /**

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java
Mon Jan 21 12:56:08 2008
@@ -29,7 +29,7 @@
 /**
  * @version $Revision: 1.1 $
  */
-public class XmlTestSupport extends TestSupport {
+public abstract class XmlTestSupport extends TestSupport {
     protected final transient Log log = LogFactory.getLog(getClass());
     protected JAXBContext jaxbContext;
Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

hadrian
Hi Roman,

No need for jiras for simple/cosmetic changes.

Cheers
hz

On Jan 21, 2008, at 4:02 PM, Roman Kalukiewicz wrote:

> The question is like in the subject: Should I create a JIRA issue for
> everything that I change, or not?
>
> As an example of such 'simple' change lets look at my forwarded  
> commit.
>
> Roman
>
> ---------- Forwarded message ----------
> From: [hidden email] <[hidden email]>
> Date: 21-01-2008 21:56
> Subject: svn commit: r614007 - in
> /activemq/camel/trunk/camel-core/src/test/java/org/apache/camel:
> ContextTestSupport.java ExchangeTestSupport.java
> model/XmlTestSupport.java
> To: [hidden email]
>
>
> Author: romkal
> Date: Mon Jan 21 12:56:08 2008
> New Revision: 614007
>
> URL: http://svn.apache.org/viewvc?rev=614007&view=rev
> Log:
> ContextTestSupport supports many RouteBuilders to be tested
> Tests without test methods made abstract so eclipse doesn't complain
> when executing them
>
> Modified:
>    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ContextTestSupport.java
>    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ExchangeTestSupport.java
>    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> model/XmlTestSupport.java
>
> Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/
> camel/ContextTestSupport.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ContextTestSupport.java
> (original)
> +++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ContextTestSupport.java
> Mon Jan 21 12:56:08 2008
> @@ -24,6 +24,7 @@
> import org.apache.camel.component.mock.MockEndpoint;
> import org.apache.camel.impl.DefaultCamelContext;
> import org.apache.camel.impl.JndiRegistry;
> +import  
> org.apache.camel.processor.CreateRouteWithNonExistingEndpointTest;
> import org.apache.camel.spi.Language;
> import org.apache.camel.util.jndi.JndiTest;
>
> @@ -68,9 +69,11 @@
>         template = new CamelTemplate<Exchange>(context);
>
>         if (useRouteBuilder) {
> -            RouteBuilder builder = createRouteBuilder();
> -            log.debug("Using created route builder: " + builder);
> -            context.addRoutes(builder);
> +            RouteBuilder[] builders = createRouteBuilders();
> +            for (RouteBuilder builder : builders) {
> +                log.debug("Using created route builder: " + builder);
> +                context.addRoutes(builder);
> +            }
>         }
>         else {
>             log.debug("Using route builder from the created context:
> " + context);
> @@ -138,6 +141,16 @@
>         };
>     }
>
> +    /**
> +     * Factory method which derived classes can use to create an  
> array of
> +     * {@link RouteBuilder}s to define the routes for testing
> +     *
> +     * @see #createRouteBuilder()
> +     */
> +    protected RouteBuilder[] createRouteBuilders() throws Exception {
> +        return new RouteBuilder[] {createRouteBuilder()};
> +    }
> +
>     /**
>      * Resolves a mandatory endpoint for the given URI or an
> exception is thrown
>      *
>
> Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/
> camel/ExchangeTestSupport.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ExchangeTestSupport.java
> (original)
> +++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> ExchangeTestSupport.java
> Mon Jan 21 12:56:08 2008
> @@ -25,7 +25,7 @@
>  *
>  * @version $Revision: 1.1 $
>  */
> -public class ExchangeTestSupport extends ContextTestSupport {
> +public abstract class ExchangeTestSupport extends  
> ContextTestSupport {
>     protected Exchange exchange;
>
>     /**
>
> Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/
> camel/model/XmlTestSupport.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlTestSupport.java?rev=614007&r1=614006&r2=614007&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> model/XmlTestSupport.java
> (original)
> +++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/
> model/XmlTestSupport.java
> Mon Jan 21 12:56:08 2008
> @@ -29,7 +29,7 @@
> /**
>  * @version $Revision: 1.1 $
>  */
> -public class XmlTestSupport extends TestSupport {
> +public abstract class XmlTestSupport extends TestSupport {
>     protected final transient Log log = LogFactory.getLog(getClass());
>     protected JAXBContext jaxbContext;

Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

Bruce Snyder
On Jan 21, 2008 2:10 PM, Hadrian Zbarcea <[hidden email]> wrote:
> Hi Roman,
>
> No need for jiras for simple/cosmetic changes.

For the commit that Roman is asking about, he should definitely create
a JIRA issue explaining the problem. Then the SVN commit log should
contain the JIRA issue number so that the commit can be automatically
associated with the JIRA issue.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/
Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

hadrian
I stand corrected.  The change to ContextTestSupport.java is not  
really a simple one.
Thanks,
Hadrian



On Jan 21, 2008, at 4:19 PM, Bruce Snyder wrote:

> On Jan 21, 2008 2:10 PM, Hadrian Zbarcea <[hidden email]> wrote:
>> Hi Roman,
>>
>> No need for jiras for simple/cosmetic changes.
>
> For the commit that Roman is asking about, he should definitely create
> a JIRA issue explaining the problem. Then the SVN commit log should
> contain the JIRA issue number so that the commit can be automatically
> associated with the JIRA issue.
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!
> G;6%I;\"YC;VT*"
> );'
>
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
>
> Blog: http://bruceblog.org/

Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

RomKal
2008/1/21, Hadrian Zbarcea <[hidden email]>:
> I stand corrected.  The change to ContextTestSupport.java is not
> really a simple one.
> Thanks,
> Hadrian

OK - so next commit will be better ;)

Roman
Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

Bruce Snyder
On Jan 21, 2008 3:19 PM, Roman Kalukiewicz <[hidden email]> wrote:
> 2008/1/21, Hadrian Zbarcea <[hidden email]>:
> > I stand corrected.  The change to ContextTestSupport.java is not
> > really a simple one.
> > Thanks,
> > Hadrian
>
> OK - so next commit will be better ;)

Just manually add the SVN revision number to the JIRA issue via a
comment. Here's the SVN revision:

http://svn.apache.org/viewvc?rev=614007&view=rev

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/
Reply | Threaded
Open this post in threaded view
|

Re: Should I create an JIRA issue for every commit?

RomKal
> Just manually add the SVN revision number to the JIRA issue via a
> comment.

Done as CAMEL-305

Roman