You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/11/08 15:27:11 UTC
svn commit: r1407098 -
/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
Author: elecharny
Date: Thu Nov 8 14:27:11 2012
New Revision: 1407098
URL: http://svn.apache.org/viewvc?rev=1407098&view=rev
Log:
Avoid an exception when the members are not defined
Modified:
directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1407098&r1=1407097&r2=1407098&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java (original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Thu Nov 8 14:27:11 2012
@@ -328,14 +328,43 @@ public class FrameworkRunner extends Blo
// At this point, we know which service to use.
// Inject it into the class
- Method setService = getTestClass().getJavaClass().getMethod( SET_SERVICE_METHOD_NAME,
- DirectoryService.class );
- setService.invoke( getTestClass().getJavaClass(), directoryService );
+ Method setService = null;
+
+ try
+ {
+ setService = getTestClass().getJavaClass().getMethod( SET_SERVICE_METHOD_NAME,
+ DirectoryService.class );
+
+ setService.invoke( getTestClass().getJavaClass(), directoryService );
+ }
+ catch ( NoSuchMethodException nsme )
+ {
+ // Do nothing
+ }
// if we run this class in a suite, tell it to the test
- Method setLdapServer = getTestClass().getJavaClass().getMethod( SET_LDAP_SERVER_METHOD_NAME,
- LdapServer.class );
- Method setKdcServer = getTestClass().getJavaClass().getMethod( SET_KDC_SERVER_METHOD_NAME, KdcServer.class );
+ Method setLdapServer = null;
+
+ try
+ {
+ setLdapServer = getTestClass().getJavaClass().getMethod( SET_LDAP_SERVER_METHOD_NAME,
+ LdapServer.class );
+ }
+ catch ( NoSuchMethodException nsme )
+ {
+ // Do nothing
+ }
+
+ Method setKdcServer = null;
+
+ try
+ {
+ setKdcServer = getTestClass().getJavaClass().getMethod( SET_KDC_SERVER_METHOD_NAME, KdcServer.class );
+ }
+ catch ( NoSuchMethodException nsme )
+ {
+ // Do nothing
+ }
DirectoryService oldLdapServerDirService = null;
DirectoryService oldKdcServerDirService = null;