On 04/04/2021 23:17, Emmanuel Lécharny wrote:
Hmmm, I think there must be a side effect.
The following line :
testClass.getField( "service" )...
can't return the reference of the service field, which is not present in
the LdapConnectionTest class, but is present in the AbstractLdapTestUnit
I would add that in my case, when the beforeAll callback is called, we
don't have yet an instance of the test class, which leads to a NPE later
when we try to set the field's value - which is expected -.
FTR here is the extension I'm using:
/*
* Licensed to the Apache Software Foundation (ASF
Hmmm, I think there must be a side effect.
The following line :
testClass.getField( "service" )...
can't return the reference of the service field, which is not present in
the LdapConnectionTest class, but is present in the AbstractLdapTestUnit
parent class. And getField() does not return fie
Here is a quick and dirty demo which "works on my machine" ;)
https://github.com/apache/directory-server/commit/d10cf254dca9317b54dd39489ed249098a984436
On 4/4/21 6:56 PM, Emmanuel Lécharny wrote:
> Sadly, that does not work :/
>
> The test class is not yet existing when we call testClass.getFie
Sadly, that does not work :/
The test class is not yet existing when we call testClass.getField(
"service" ).set( null, new DefaultDirectoryService() )
so I get a NPE on the set.
There seems to be a internal Junit5 mechanism that allow you to get the
field to set but you can't inject some va
Ah, cool, have'nt thought about this solution.
Will try that !
Thanks Stefan!
On 04/04/2021 14:00, Stefan Seelmann wrote:
Actually with the BeforeAllCallback we can get the test class from the
ExtensionContext and set the static fields via reflection:
public class BeforeAllInjector implements
Actually with the BeforeAllCallback we can get the test class from the
ExtensionContext and set the static fields via reflection:
public class BeforeAllInjector implements BeforeAllCallback
{
@Override
public void beforeAll( ExtensionContext context ) throws Exception
{
Class t
Instead of BeforeAll it seems we can use TestInstancePostProcessor which
postProcessTestInstance() method signature includes the test instance:
public class BeforeAllInjector implements TestInstancePostProcessor
{
@Override
public void postProcessTestInstance( Object testInstance,
Extensio
Hi !
I'm fighting with a piece of our test framework that worked well with
Junit4, not so much with Junit5.
In Junit4, we were using Rule and ClassRule to declare some
DirectoryService used in tests (typically, if we want to test some
features, we start with a DS creation that will be visibl
[
https://issues.apache.org/jira/browse/DIRAPI-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seelmann resolved DIRAPI-368.
Resolution: Fixed
> StackOverflowError when working with entries with thousands of attribut
[
https://issues.apache.org/jira/browse/DIRAPI-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314439#comment-17314439
]
Stefan Seelmann commented on DIRAPI-368:
We can decide to remove the reverse orde
elecharny commented on pull request #16:
URL: https://github.com/apache/directory-ldap-api/pull/16#issuecomment-812993575
This is all good to me. I have added some comment in DIRAPI-368, just for
the record.
Many thanks Stefan.
And I think we should cut an API release next wee
elecharny merged pull request #16:
URL: https://github.com/apache/directory-ldap-api/pull/16
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this servic
[
https://issues.apache.org/jira/browse/DIRAPI-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314436#comment-17314436
]
Emmanuel Lécharny commented on DIRAPI-368:
--
Actually, I don't know why we try to
[
https://issues.apache.org/jira/browse/DIRSTUDIO-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314434#comment-17314434
]
Schplurtz le Déboulonné commented on DIRSTUDIO-1270:
Hi. Sorry fo
[
https://issues.apache.org/jira/browse/DIRAPI-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314433#comment-17314433
]
Stefan Seelmann commented on DIRAPI-202:
[~Chris Harris] It's a while since the l
16 matches
Mail list logo