[FIX] APOP authentication

ducasse ducasse at iam.unibe.ch
Sun Sep 7 08:51:03 UTC 2003


Ok
I see the problem. but this is always good to say that we need unit 
tests. :)

Stef

On Dimanche, sep 7, 2003, at 10:59 Europe/Zurich, Mike Rutenberg wrote:

> Stefan,
>
> You are mistaken.  I am very much a fan of well written and appropriate
> SUnit tests for most of the core Squeak infrastructure.  We have far 
> too
> little of that.
>
> But this is a small non core area which is difficult to write an SUnit
> test for.  Technically it is easy.  But I do not have a
> (Server,Account,Password) that I can use for a openly published SUnit
> test so that this can run headless.  Not to mention that the problem
> that this FIX is solving happens 1/16 of the time, which is why I 
> repeat
> the login loop 200 times in the test I sent you.
>
> Mike
>
>
> ducasse <ducasse at iam.unibe.ch> wrote:
>> Mike
>>
>> apparently we were strong enough on unit testing at esug. I though 
>> that
>> we brainswashed everybody but you resisted :)
>>
>>   The key point is that if you send a unit test, marcus will collect 
>> it
>> and add to the collection of automated tests that we can run on the
>> testserver.
>> This way we can take any squeak image run the tests and know what is
>> broken or not.
>>
>> So I urge you to have a look at my SUnit tutorial and write SUnit. The
>> cost is just writig a class and putting
>> your test into a method that start with test and use assert at the
>> right place. This way you obtain a test that
>> we can run automatically in a headless image. This way slowly we can
>> build a confidence that Squeak is working
>> and have less and less bugs, that we can change it.....
>>
>> Stef
>>
>>
>> On Samedi, sep 6, 2003, at 09:26 Europe/Zurich, Mike Rutenberg wrote:
>>
>>>> I was just wondering if you could write some tests for your fixes
>>>> because like that we get sure that they will not happen again.
>>>
>>> Stef,
>>>
>>> Here is a test DoIt for the APOP authentication.  The server must
>>> support APOP authentication.  In the default 3.6 image this will fail
>>> on
>>> average after 16 successful logins.  After the [FIX] is applied it
>>> works
>>> for any number of iterations.
>>>
>>> 	| ps userName password server |
>>> 	userName := (FillInTheBlank request: 'POP username').
>>> 	password := (FillInTheBlank request: 'POP password').
>>> 	server _ (FillInTheBlank request: 'POP server which supports APOP
>>> authentication').
>>>
>>> 	200 timesRepeat: [[
>>> 	ps _ POP3Client openOnHostNamed: server.
>>> 	ps logProgressToTranscript.
>>> 	ps apopLoginUser: userName password: password.
>>> 	ps quit.]
>>> 		ensure: [ps close]].
>>>
>>> The 3 line [FIX] is well tested.  I have been using a previous 
>>> version
>>> of it in my old image for a year and a half.  I am using the 
>>> submitted
>>> version daily in my 3.6 image.
>>>
>>> Hope this helps.  Let me know if you have any questions.
>>>
>>> Mike
>>>
>



More information about the Squeak-dev mailing list