From: Stefan F. <ste...@we...> - 2011-07-05 05:24:21
|
Brett: sorry to object: This code is necessary to run the integration tests. It is a workaround to run multiple tests in sequence without starting a new JVM. As Erik mentions this is related to the fact that it uses static class variables. I have attached again the document (from March 2010) on testing, which include more details on pitfalls to avoid. I will move that to the Wiki as soon as I have more time to do that. Can I ask you to reverse that change, as I have too many changes in my workspace, which are not ready for a commit? Thanks in advance, Stefan On Tuesday, July 05, 2011 12:04:24 am brett lentz wrote: > Excellent. Then that's what I'll do. :-) > > ---Brett. > > On Mon, Jul 4, 2011 at 1:58 PM, Erik Vos <eri...@xs...> wrote: > > No, you're not missing any deep thoughts here. Of course one of these > > initializations is completely redundant. Can't tell how it became this > > way - I suppose one day I have overlooked it while doing some > > refactoring. > > > > The bad news that these indexes are static. These should IMO be moved to > > some instance in the object creation chain. > > > > Erik. > > > >> -----Oorspronkelijk bericht----- > >> Van: brett lentz [mailto:bre...@gm...] > >> Verzonden: maandag 4 juli 2011 22:12 > >> Aan: Development list for Rails: an 18xx game > >> Onderwerp: [Rails-devel] Token.init() and SpecialProperty.init() > >> > >> I'm positive I'm missing something here. > >> > >> In both Token and SpecialProperty, we're defining some static class > > > > variables, > > > >> such as: > >> > >> private static int index = 0; > >> > >> Then, in the init() method, we're re-defaulting it to the same value > >> we've already declared, such as: > >> > >> // initialize the special properties static variables > >> public static void init() { > >> tokenMap = new HashMap<String, TokenI>(); > >> index = 0; > >> log.debug("Init token static variables"); > >> } > >> > >> > >> Why is this necessary? Is the defined default value insufficient in some > > > > way > > > >> that isn't immediately obvious? > >> > >> ---Brett. > > > > ------------------------------------------------------------------------- > > --- -- > > > >> All of the data generated in your IT infrastructure is seriously > >> valuable. Why? It contains a definitive record of application > >> performance, security threats, fraudulent activity, and more. Splunk > >> takes this data and makes sense of it. IT sense. And common sense. > >> http://p.sf.net/sfu/splunk-d2d-c2 > >> _______________________________________________ > >> Rails-devel mailing list > >> Rai...@li... > >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ------------------------------------------------------------------------- > > ----- All of the data generated in your IT infrastructure is seriously > > valuable. Why? It contains a definitive record of application > > performance, security threats, fraudulent activity, and more. Splunk > > takes this data and makes sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > --------------------------------------------------------------------------- > --- All of the data generated in your IT infrastructure is seriously > valuable. Why? It contains a definitive record of application performance, > security threats, fraudulent activity, and more. Splunk takes this data > and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |