michaelyin / openmeetings

Automatically exported from code.google.com/p/openmeetings
0 stars 0 forks source link

JUNIT Test cases not executing successfully #836

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of OpenMeetings are you running?
0penmeeting 0.9rc revision# 2185

What's your operating system on client and server side?
Windows Vista.

Is it a problem related to the client/usability or server-side?
NO

Did you have any trace/debug output?

Server side loging:

java.lang.NoSuchMethodError?:
org.slf4j.impl.StaticLoggerBinder?.getSingleton()Lorg/slf4j/impl/StaticLoggerBin
der?;

    at
org.red5.logging.Red5LoggerFactory?.getLogger(Red5LoggerFactory?.java:84)
at
org.red5.logging.Red5LoggerFactory?.getLogger(Red5LoggerFactory?.java:78)
at
org.openmeetings.batik.TestSimpleSVGDom.<clinit>(TestSimpleSVGDom.java:23)
at sun.reflect.NativeConstructorAccessorImpl?.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl?.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl?.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at
junit.framework.TestSuite?.createTest(TestSuite?.java:56) at
junit.framework.TestSuite?.addTestMethod(TestSuite?.java:279) at
junit.framework.TestSuite?.<init>(TestSuite?.java:142) at
org.junit.internal.runners.OldTestClassRunner?.<init>(OldTestClassRunner?.java:2
3)
at sun.reflect.NativeConstructorAccessorImpl?.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl?.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl?.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at
org.junit.internal.requests.ClassRequest?.getRunner(ClassRequest?.java:27)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestRefe
rence.java:28)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4Tes
tClassReference.java:24)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoa
der.java:40)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoad
er.java:30)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunne
r?.java:445)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunne
r?.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.run(RemoteTestRunner?.ja
va:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.main(RemoteTestRunner?.j
ava:196)

Found the cause : incorrect version of SJ4J logger classes in developement
tree..

Get fixed if i chose sl4j jars from red5.

Original issue reported on code.google.com by niranjan...@gmail.com on 29 Jul 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Which test are you running?

Original comment by seba.wag...@gmail.com on 6 Aug 2009 at 2:15

GoogleCodeExporter commented 9 years ago
All of them which are in the src/test folder.

basically all of your code has this at the top

static Logger log =Red5LoggerFactory.getLogger(TestSVGTextExporter.class);
and every test would fail because of this statement.

we need to place a logback-test.xml or logback.xml which i basically copied 
from 
the red5+openmeetings bundle which is there in the download section.
and had to make the following changes to make the tests to run.

<classpathentry kind="lib" path="lib/slf4j/logback-classic-0.9.14.jar"/>
<classpathentry kind="lib" path="lib/slf4j/logback-core-0.9.14.jar"/>
<classpathentry kind="lib" path="lib/slf4j/jcl-over-slf4j-1.5.6.jar"/>
<classpathentry kind="lib" path="lib/slf4j/log4j-over-slf4j-1.5.6.jar"/>
<classpathentry kind="lib" path="lib/slf4j/slf4j-api-1.5.6.jar"/>

instead of
<classpathentry kind="lib" path="lib/slf4j/jcl-over-slf4j-1.5.3.jar"/>
<classpathentry kind="lib" path="lib/slf4j/log4j-over-slf4j-1.5.3.jar"/>
<classpathentry kind="lib" 
path="lib/slf4j/logback-classic-0.9.10-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/slf4j/logback-core-0.9.10-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/slf4j/slf4j-api-1.5.3.jar"/>

I guess all of these are not compile-time dependencies. 
so the older version doesnt hinder the build and the updated versions are all 
picked
up the RED5_HOME/lib directory.

Am i wrong in saying that trunk-webapp source code should have the same jars?

Original comment by niranjan...@gmail.com on 6 Aug 2009 at 6:35

GoogleCodeExporter commented 9 years ago
I am actually exposing some more APIs from Open-meeting. and have exposed APIs
like 

addAppointment,addUserToAppointment,getAppointmentRoom,getAppointmentByRange
registerNewUser

And since you guys already had some testing code, i wanted to write some tests
myselfs to check if my service was working fine.

Original comment by niranjan...@gmail.com on 6 Aug 2009 at 6:38

GoogleCodeExporter commented 9 years ago
I run the JUnit test using Eclipse. So I never run into that.

Original comment by seba.wag...@gmail.com on 6 Aug 2009 at 7:03

GoogleCodeExporter commented 9 years ago
Since i have caught your attention, I need to ask you one more thing.
Is it not possible to auto-login a 'non-admin' user. 
Of what i have read from various posts
and your replies, Direct-Login workflow works only for admin-user.

Original comment by niranjan...@gmail.com on 6 Aug 2009 at 7:18

GoogleCodeExporter commented 9 years ago
yes, because of security. Makes no sense to allow login via soap for any kind 
of user.

Original comment by seba.wag...@gmail.com on 6 Aug 2009 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by seba.wag...@gmail.com on 31 Jan 2012 at 12:22

GoogleCodeExporter commented 9 years ago
OpenMeetings moves to Apache Foundation, update your bookmarks to the new 
project page:

http://incubator.apache.org/openmeetings/

New Issue tracker is located: https://issues.apache.org/jira/browse/OPENMEETINGS

New Mailing Lists located at: 
http://incubator.apache.org/openmeetings/mail-lists.html 

Original comment by seba.wag...@gmail.com on 31 Jan 2012 at 12:25