On Oct 16, 2023, at 10:48 PM, Emmanuel Lécharny <elecha...@gmail.com> wrote:
Hi Shawn,
regarding the FrameworkRunner class, it has been removed from ApacheDS code
base when we migrated from Junit4 to Junit 5.
I do think that you need to replace calls to FrameworkRunner by:
@ExtendWith( ApacheDSTestExtension.class )
it should do the trick.
For instance, the AddIT test class for core-integ was:
/**
* Test the add operation
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@RunWith(FrameworkRunner.class)
@CreateDS(
name = "AddITDS",
loadedSchemas =
{ @LoadSchema(name = "nis", enabled = true) },
partitions =
{
@CreatePartition(
name = "example",
suffix = "dc=example,dc=com",
contextEntry = @ContextEntry(
entryLdif =
"dn: dc=example,dc=com\n" +
"dc: example\n" +
"objectClass: top\n" +
"objectClass: domain\n\n"),
indexes =
{
@CreateIndex(attribute = "objectClass"),
@CreateIndex(attribute = "sn"),
@CreateIndex(attribute = "cn")
})
},
enableChangeLog = false)
public class AddIT extends AbstractLdapTestUnit
{
/**
* Test an add operation with a value that needs to be normalized
*/
@Test
public void testAddNotNormalized() throws Exception
{
LdapConnection connection = IntegrationUtils.getAdminConnection(
getService() );
Dn dn = new Dn( "cn=test,ou=system" );
Entry entry = new DefaultEntry( dn,
"ObjectClass: top",
"ObjectClass: person",
"sn: TEST ",
"cn: test" );
connection.add( entry );
entry = connection.lookup( entry.getDn(),
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
Entry contextEntry = connection.lookup( "ou=system",
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
String expectedCsn = entry.get( SchemaConstants.ENTRY_CSN_AT
).getString();
String contextCsn = contextEntry.get( SchemaConstants.CONTEXT_CSN_AT
).getString();
assertEquals( expectedCsn, contextCsn );
}
...
}
and now is:
**
* Test the add operation
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@ExtendWith( { ApacheDSTestExtension.class } )
@CreateDS(
name = "AddITDS",
loadedSchemas =
{ @LoadSchema(name = "nis", enabled = true) },
partitions =
{
@CreatePartition(
name = "example",
suffix = "dc=example,dc=com",
contextEntry = @ContextEntry(
entryLdif =
"dn: dc=example,dc=com\n" +
"dc: example\n" +
"objectClass: top\n" +
"objectClass: domain\n\n"),
indexes =
{
@CreateIndex(attribute = "objectClass"),
@CreateIndex(attribute = "sn"),
@CreateIndex(attribute = "cn")
})
},
enableChangeLog = false)
public class AddIT extends AbstractLdapTestUnit
{
/**
* Test an add operation with a value that needs to be normalized
*/
@Test
public void testAddNotNormalized() throws Exception
{
LdapConnection connection = IntegrationUtils.getAdminConnection(
getService() );
Dn dn = new Dn( "cn=test,ou=system" );
Entry entry = new DefaultEntry( dn,
"ObjectClass: top",
"ObjectClass: person",
"sn: TEST ",
"cn: test" );
connection.add( entry );
entry = connection.lookup( entry.getDn(),
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
Entry contextEntry = connection.lookup( "ou=system",
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
String expectedCsn = entry.get( SchemaConstants.ENTRY_CSN_AT
).getString();
String contextCsn = contextEntry.get( SchemaConstants.CONTEXT_CSN_AT
).getString();
assertEquals( expectedCsn, contextCsn );
}
That should not be such a big change.
On 16/10/2023 19:31, Shawn McKinney wrote:
On Oct 16, 2023, at 9:12 AM, Emmanuel Lécharny <elecha...@gmail.com> wrote:
Hi Colm,
just pushed the packages to dist!
Hi Emmanuel.
I’m still testing. I can build and run tests on Java 17. Can install the server
using the snapshots. Have run fortress core integration tests and they all pass.
To use the latest AM27 in fortress core had to remove these dependencies:
apacheds-interceptor-kerberos
apacheds-kerberos-codec
apacheds-protocol-kerberos
From test scope in pom. No problem, Kerb is not supported in the server as
indicated by the issue list.
Not sure why it was in fortress core. There are no compile time dependencies on
these packages. Extraneous?
In any case, not a server issue.
But, there’s also this when I compile fortress core using AM27:
```
[ERROR]
/opt/fortress/directory-fortress-core/src/test/java/org/apache/directory/fortress/core/impl/apacheds/FortressJUnitApachedsTest.java:[29,46]
cannot find symbol
symbol: class FrameworkRunner
location: package
org.apache.directory.server.core.integ
```
Did this package move? We do have a compile dependency in test scope for:
org.apache.directory.server.core.integ.FrameworkRunner;
Probably not a showstopper for release. Something needs to be worked out in
Fortress going forward.
Thanks
—
Shawn
--
*Emmanuel Lécharny* P. +33 (0)6 08 33 32 61
elecha...@apache.org