From dev-return-27168-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Mon Sep 15 00:20:01 2008 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 40025 invoked from network); 15 Sep 2008 00:20:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Sep 2008 00:20:01 -0000 Received: (qmail 85418 invoked by uid 500); 15 Sep 2008 00:19:57 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 85374 invoked by uid 500); 15 Sep 2008 00:19:57 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 85362 invoked by uid 99); 15 Sep 2008 00:19:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Sep 2008 17:19:57 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of akarasulu@gmail.com designates 209.85.200.174 as permitted sender) Received: from [209.85.200.174] (HELO wf-out-1314.google.com) (209.85.200.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Sep 2008 00:18:59 +0000 Received: by wf-out-1314.google.com with SMTP id 27so1809048wfd.31 for ; Sun, 14 Sep 2008 17:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=B/8slNkp2ad4oDxZUiC65IsmQ989jaILKMigyUhTTlk=; b=OfGHvsyw2gqNuZQFTa+ooZmW5pAkCaGfORjajqZbyNYDUVSA2Y3QvmOZYL70DsjwiY n8TewPl7Mr4HJrdiVVuxQSEukIMoGWYIbp/GUQ+cHM6FmfKCo/AO9BdyN9tfqPGSGliB OMKRzOeIW7XNtyysSiW52YOIxmhtHkfIHZpxw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=UafWUHlkuJDIJO2781Sc/lnr9YEBCreu89LISyEAZZ/QwMjovc5EFJb00ecwl4WrFI u4jhdMCbUp9IgcrT1OO9AlPI2hqLss4P5UqxkDR3GL0UtwVIWkCgHJhJXDWszrvf0fee /CsDrRtp0tDKNxMcVaK/tc3WPfdGbrfkt+U4w= Received: by 10.115.73.20 with SMTP id a20mr5518087wal.213.1221437971482; Sun, 14 Sep 2008 17:19:31 -0700 (PDT) Received: by 10.114.66.3 with HTTP; Sun, 14 Sep 2008 17:19:31 -0700 (PDT) Message-ID: Date: Sun, 14 Sep 2008 20:19:31 -0400 From: "Alex Karasulu" Sender: akarasulu@gmail.com To: "Apache Directory Developers List" Subject: Re: Loading custom schemas with AbstractServerTest under 1.5.4 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23987_9730825.1221437971465" References: X-Google-Sender-Auth: 9ff50a7881bdeccf X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_23987_9730825.1221437971465 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Just look at the code in the JUnit base classes that enable a schema. Push that code into your TestNG harness. It's rather simple. Alex On Sun, Sep 14, 2008 at 8:15 PM, Mark Derricutt wrote: > Replying to my own post - whilst I thought I was running this against 1.5.3 > it seems I wasn't, at least for the tests which appeared to be using 1.0.2 > or something. > > I see that schema objects are configured in the constructor of > DefaultDirectoryService which isn't accessable, and I also see that ApacheDS > has moved to JUnit 4.4 for its current integration tests - which puts me in > a pickle. > > All I'm actually after is a way to embed/launch ApacheDS with a custom > schema, for our app to talk to during its integration testing phase. As > we're using TestNG I'd like to do something thats not JUnit if possible, > maybe some form of maven plugin which starts a server using a custom schema? > > Any one have any ideas or suggestions? > > > On Mon, Sep 15, 2008 at 11:36 AM, Mark Derricutt wrote: > >> 'lo >> >> With the recent changes to AbstractServerTest in 1.5.4, how does one >> register custom schemas now? >> >> Under 1.5.3 I was using: >> >> Set schemas = >> configuration.getBootstrapSchemas(); >> schemas.add(new Smx3Schema()); >> configuration.setBootstrapSchemas(schemas); >> >> where configuration came from the AbstractServerTest. It looks like the >> test harness has changed a bit. I"m actually using TestNG to execute my >> tests, rather than JUnit so hopefully theres still a way to handle this >> easily. >> >> Mark >> He who started looking at ldap integration testing at the wrong time.. >> >> -- >> "It is easier to optimize correct code than to correct optimized code." -- >> Bill Harlan >> > > > > -- > "It is easier to optimize correct code than to correct optimized code." -- > Bill Harlan > ------=_Part_23987_9730825.1221437971465 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Just look at the code in the JUnit base classes that enable a schema.  Push that code into your TestNG harness.  It's rather simple.

Alex

On Sun, Sep 14, 2008 at 8:15 PM, Mark Derricutt <mark@talios.com> wrote:
Replying to my own post - whilst I thought I was running this against 1.5.3 it seems I wasn't, at least for the tests which appeared to be using 1.0.2 or something.

I see that schema objects are configured in the constructor of DefaultDirectoryService which isn't accessable, and I also see that ApacheDS has moved to JUnit 4.4 for its current integration tests - which puts me in a pickle.

All I'm actually after is a way to embed/launch ApacheDS with a custom schema, for our app to talk to during its integration testing phase.  As we're using TestNG I'd like to do something thats not JUnit if possible, maybe some form of maven plugin which starts a server using a custom schema?

Any one have any ideas or suggestions?


On Mon, Sep 15, 2008 at 11:36 AM, Mark Derricutt <mark@talios.com> wrote:
'lo

With the recent changes to AbstractServerTest in 1.5.4, how does one register custom schemas now?

Under 1.5.3 I was using:

        Set<AbstractBootstrapSchema> schemas = configuration.getBootstrapSchemas();
        schemas.add(new Smx3Schema());
        configuration.setBootstrapSchemas(schemas);

where configuration came from the AbstractServerTest.  It looks like the test harness has changed a bit.  I"m actually using TestNG to execute my tests, rather than JUnit so hopefully theres still a way to handle this easily.

Mark
He who started looking at ldap integration testing at the wrong time..

--
"It is easier to optimize correct code than to correct optimized code." -- Bill Harlan



--
"It is easier to optimize correct code than to correct optimized code." -- Bill Harlan

------=_Part_23987_9730825.1221437971465--