Hi Felix,

Demo mode in Hupa does not use a dummy mail server, it uses guice and gin to
inject mock implementations of imap and smtp client classes no dummy servers
at all.
There are no integration tests in Hupa needing a running server, all tests
are unit tests (I love TDD and think that integration tests are not needed
during the developing if unit tests are good enough :-) ), and some of them
are able to call server methods from client code but without running a
servlet container, just a pure JVM implementation of the dispatcher.
Hupa was in its origin an example of an GWT application developed with the
MVP pattern, whose main goal is to test as much client side code as possible
with fast tests instead of using the slow GWTTestCase which starts a browser
and a servlet container.

When compiling Hupa, it produces a .war ready to run as demo or as
production code depending on a properties file which could be placed in
/etc/default, $HOME/.hupa or inside the war.

I agree that we should not distribute the production war with test code, so
we could use maven to produce a demo.war and a hupa.war.

Anyway, the point of having those classes there is to help while developing
in hosted mode, it is much easier to test visual components if the gwt
hosted mode starts fast. Now Gwt plugin for eclipse facilitates to work with
a maven project but time ago it was a pain to include test resources.

I'll work on adding request factory and removing stuff which is already in
new gwt so as we had less external dependencies, I'll tray not to add new
features, after we could add features, fix issues and reorganize the
sources.

- Manolo



On Wed, Sep 28, 2011 at 12:03 AM, Felix Knecht <[email protected]> wrote:

> Hi Manolo
>
> Comments inline
>
>
> On 09/27/2011 07:11 PM, Manuel Carrasco Mońino wrote:
>
>> Hi Felix,
>> Demo is a set of messages used for unit testting. Those messages are used
>> for demoing, in demo mode we inject mock imap and smpt implementations, so
>> there is no imap connection nor smtp (although it is possible to deliver
>> smtp if it is configured).
>>
>
> I'm quite sure we can use a dummy mail server (like greenmail, see later)
> to contain and deliver these demo message also.
>
>
>
>> I think we could move those classes/resources to the test folder but demo
>> mode is pretty useful when developing or testing the app before
>> configuring
>> it. I prefer to leave these classes here instead of creating a package to
>> be
>> shared by test and production war.
>>
>
> What do you mean by 'test war'? IMO a 'production war' should not contain
> code used only for running tests but not in productivity. There should be
> another way to do this.
> Some tests may have to be run as integration tests - not only test. So a
> dummy mail server can be started before the integration tests are run and be
> shutdown after the integration test. Maybe we can use greenmail (
> http://www.icegreen.com/**greenmail/ <http://www.icegreen.com/greenmail/>)
> for this.
>
> I can imaging that the application run as demo also bases on such a dummy
> server.
>
>
>
>> BTW, I have some code I started to port HUPA to use the Request Factory in
>> gwt-2.4.0, I did not finished it since 2.2 and 2.3 had an important memory
>> leak issue, which it seems fixed in 2.4.0, may I commit it?, or better
>> could
>> we use this or another thread to propose a set of changes hupa needs.
>>
>
> No problem, go ahead and commit it. Hupa has - as far as I can see - never
> been released, so everything can be done.
>
> Regards
> Felix
>
>
>> Cheers
>> - Manolo
>>
>> On Fri, Sep 23, 2011 at 2:35 PM, Felix Knecht<[email protected]>  wrote:
>>
>>  Hi all
>>>
>>> According to HUPA-25 [1] there should be a running demo of hupa at [2].
>>> It
>>> isn't - I know, it's an open issue.
>>>
>>> Why I come to this? I found several classes in the productive (not test)
>>> part in the server module to enable running the demo. I wonder if there's
>>> really a need to 'pollute' productive parts with code used only to run a
>>> demo?
>>>
>>> What about removing this 'demo-code' from the productive part and find
>>> another way to run a demo if ever?
>>>
>>> WDOT?
>>>
>>> Regards
>>> Felix
>>>
>>> [1] 
>>> https://issues.apache.org/****jira/browse/HUPA-25<https://issues.apache.org/**jira/browse/HUPA-25>
>>> <https://**issues.apache.org/jira/browse/**HUPA-25<https://issues.apache.org/jira/browse/HUPA-25>
>>> >
>>> [2] http://james.zones.apache.org:****8080/hupa/<http://james.**
>>> zones.apache.org:8080/hupa/ <http://james.zones.apache.org:8080/hupa/>>
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.****apache.org<
>>> server-dev-**[email protected]<[email protected]>
>>> >
>>> For additional commands, e-mail: [email protected].****org<
>>> server-dev-help@james.**apache.org <[email protected]>>
>>>
>>>
>>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> server-dev-unsubscribe@james.**apache.org<[email protected]>
> For additional commands, e-mail: 
> [email protected].**org<[email protected]>
>
>

Reply via email to