You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Eung-ju Park <co...@isoft.co.kr> on 2002/01/15 19:27:12 UTC

[PATCH] for LogEnabled James.

This is patch for LogEnabled James. compilable but not tested.

James need some more code cleanup like duplicated imports, not necessary
imports..... :-)

RE: [PATCH] for LogEnabled James.

Posted by Danny Angus <da...@thought.co.uk>.
I say go for it, at worst you'll only break it once ;-)
d.

>-----Original Message-----
>From: Harmeet [mailto:harmeet@kodemuse.com]
>Sent: 17 January 2002 09:04
>To: James Developers List
>Subject: Re: [PATCH] for LogEnabled James.
>
>
>----- Original Message -----
>From: "Darrell DeBoer" <li...@bigdaz.com>
>> For sure. If noone will be too heavily impacted, I could run "optimise
>> imports" on the whole tree. (Any objections?)
>
>I really don't know what "optimise imports" is, but it sounds like a great
>idea.
>go for it.
>
>Harmeet
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] for LogEnabled James.

Posted by Harmeet <ha...@kodemuse.com>.
----- Original Message -----
From: "Darrell DeBoer" <li...@bigdaz.com>
> For sure. If noone will be too heavily impacted, I could run "optimise
> imports" on the whole tree. (Any objections?)

I really don't know what "optimise imports" is, but it sounds like a great
idea.
go for it.

Harmeet


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: testing was - Re: [PATCH] for LogEnabled James.

Posted by Harmeet <ha...@kodemuse.com>.
> Personally, I'd prefer if all of the code was in Java (fewer dependencies
> and less for me to learn ;) ), but I can see why these libraries would be
> helpful. It would be great if we had something similar written in Java.
(In
> fact, it probably wouldn't be *that* hard to write...)

Jython has some nice scripting capabilities. Probably not as suited to
larger projects as Java, but a lot easier to script with. Jython can can be
fun.

>
> As to doing up some tests using these libraries, go for it. If you can
make
> them JUnit tests, even better. (As long as I can run them automated from
> ant, reporting success/failure, I'll be happy.)

Jython does works nicely with JUnit.

>
> I'm not sure about the licencing issues though - is the Jython runtime
> Apache compatible? (I guess we can just make developers download it
> separately, anyhow).

I think so. There is no problem in packaging it. Check out
http://www.jython.org/license.html

Harmeet


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: testing was - Re: [PATCH] for LogEnabled James.

Posted by Darrell DeBoer <li...@bigdaz.com>.
Hi

> I can take up some tests.
>
> I was thinking of writing tests with JPython. It seems to have pop3, smtp,
> imap, nntp client libraries and can use Java mail classes if it needs to.
> Python libraries seem to be close to the telnet level and also reasonable
to
> modify.
>
> Harmeet

Hmmm. Looks interesting. The libraries would definitely make writing tests
easier, and seem pretty close to the wire. (compared to JavaMail, which is
fully abstracted).

Personally, I'd prefer if all of the code was in Java (fewer dependencies
and less for me to learn ;) ), but I can see why these libraries would be
helpful. It would be great if we had something similar written in Java. (In
fact, it probably wouldn't be *that* hard to write...)

As to doing up some tests using these libraries, go for it. If you can make
them JUnit tests, even better. (As long as I can run them automated from
ant, reporting success/failure, I'll be happy.)

I'm not sure about the licencing issues though - is the Jython runtime
Apache compatible? (I guess we can just make developers download it
separately, anyhow).

ciao
Daz


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


testing was - Re: [PATCH] for LogEnabled James.

Posted by Harmeet <ha...@kodemuse.com>.
I can take up some tests.

I was thinking of writing tests with JPython. It seems to have pop3, smtp,
imap, nntp client libraries and can use Java mail classes if it needs to.
Python libraries seem to be close to the telnet level and also reasonable to
modify.

Harmeet
----- Original Message -----
From: "Darrell DeBoer" <li...@bigdaz.com>
>  I'm looking forward to having a few more automated tests, so that I can
> modify/refactor/improve without worrying that I might have broken
something.
>
> I reckon we need to work on 2 levels of testing.
> 1) Protocol tests.
> Simple protocol tests, which mimic what you would test using Telnet. These
> could be based on o.a.j.test.SimpleFileProtocolTest, like the
> TestAuthenticated test for IMAP. (There's also a very simple SMTP test in
> the IMAP proposal directory).
> These will tests the different server protocols (SMTP, POP3, NNTP, IMAP)
in
> a client-independent manner. The downside is that these are tedious to
> write, and very verbose.
>
> 2) Functional tests.
> These would mimic what you would test using an email client, but use
> JavaMail as the test client. (See o.a.j.imapserver.InitialMail for a
simple
> example).
> The upside to this type of testing is it's very easy to test lots of
> different combinations and permutations (eg Multipart messages, different
> encodings etc), but the downside is that they only test the protocol
> functionality that JavaMail uses.
>
> I'll probably keep working on the IMAP tests (even though they currently
> fail!) as I continue working on the IMAP server. Any volunteers for the
> other protocols?
>
> ciao
> Daz
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] for LogEnabled James.

Posted by Darrell DeBoer <li...@bigdaz.com>.
> Go for it.
OK, done. Imports are cleaned up.

> If/when things break, you can work up some tests that would have
> automatically caught what broke. :)

Yep, I'm looking forward to having a few more automated tests, so that I can
modify/refactor/improve without worrying that I might have broken something.

I reckon we need to work on 2 levels of testing.
1) Protocol tests.
Simple protocol tests, which mimic what you would test using Telnet. These
could be based on o.a.j.test.SimpleFileProtocolTest, like the
TestAuthenticated test for IMAP. (There's also a very simple SMTP test in
the IMAP proposal directory).
These will tests the different server protocols (SMTP, POP3, NNTP, IMAP) in
a client-independent manner. The downside is that these are tedious to
write, and very verbose.

2) Functional tests.
These would mimic what you would test using an email client, but use
JavaMail as the test client. (See o.a.j.imapserver.InitialMail for a simple
example).
The upside to this type of testing is it's very easy to test lots of
different combinations and permutations (eg Multipart messages, different
encodings etc), but the downside is that they only test the protocol
functionality that JavaMail uses.

I'll probably keep working on the IMAP tests (even though they currently
fail!) as I continue working on the IMAP server. Any volunteers for the
other protocols?

ciao
Daz




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] for LogEnabled James.

Posted by Serge Knystautas <se...@lokitech.com>.
Go for it.

If/when things break, you can work up some tests that would have
automatically caught what broke. :)

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Darrell DeBoer" <li...@bigdaz.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Thursday, January 17, 2002 1:15 AM
Subject: Re: [PATCH] for LogEnabled James.


> For sure. If noone will be too heavily impacted, I could run "optimise
> imports" on the whole tree. (Any objections?)
>
> ciao
> Daz



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] for LogEnabled James.

Posted by Darrell DeBoer <li...@bigdaz.com>.
Hi Eung-Ju.

> This is patch for LogEnabled James. compilable but not tested.

Applied, thanks. It passed some simple tests, and a quick eyeball didn't
show anything that I thought would break.

This is an important change, because it keeps us in line with the latest
logger developments in Avalon. 99% of the changes were in import lines, or
changing "extends AbstractLoggable" to "extends AbstractLogEnabled".

There were a few other changes, of the type:
if ( xxx instanceof Loggable) {
    ((Loggable)xxx).setLogger( logger);
}
became:
if ( xxx instanceof LogEnabled ) {
    ((LogEnabled)xxx).enableLogging( logger);
}

>
> James need some more code cleanup like duplicated imports, not necessary
> imports..... :-)
>
For sure. If noone will be too heavily impacted, I could run "optimise
imports" on the whole tree. (Any objections?)

ciao
Daz




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>