3 Replies Latest reply on Dec 11, 2008 6:58 PM by clebert.suconic

    Methods for testing only

    timfox

      If methods have been marked for testing only:

      /For testing only
       Map<SimpleString, List<Binding>> getMappings();
      


      DO NOT use them in core code!!

      e.g.:

      PostOfficeImpl:load:

       for (SimpleString destination : addressManager.getMappings().keySet())
       {
       pagingManager.createPageStore(destination);
       }
      


      And in any case, I thought we discussed and agreed that we would create page stores lazily?



        • 1. Re: Methods for testing only
          clebert.suconic

          I didn' t realize that was marked for testing. I was just using Andy' s suggestion on getting the valid addresses.

          • 2. Re: Methods for testing only
            clebert.suconic

             

            "timfox" wrote:

            And in any case, I thought we discussed and agreed that we would create page stores lazily?




            It wasn't possible to only allow the pageStore to be created lazily... because of:

            // This is necessary as if the server was previously stopped while a depage was being executed,
             // it needs to resume the depage process on those destinations
             pagingManager.startGlobalDepage();
            



            And BTW where did you find the *// For testing only *

            I'm looking at AddressManager, SimpleAddressManager (including SVN history) and I didn't find it.


            • 3. Re: Methods for testing only
              clebert.suconic

              I just realized you thought I was using PostOffice.getMappings.

              The method is using addressManager.getMappings() which seems a valid usage for me.

              The reason I'm not creating it lazily is the reason I explained on this thread.