Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junit tests fail #10

Open
p11o opened this issue Aug 15, 2011 · 5 comments
Open

junit tests fail #10

p11o opened this issue Aug 15, 2011 · 5 comments

Comments

@p11o
Copy link

p11o commented Aug 15, 2011

When I run mvn package or mvn install, some of the tests fail. The stack traces were looking for simplejpa.properties file in the classpath. I added the properties file to the classpath just to see what would happen, but more errors came up after that.

Failed tests:
testNoParameterReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testSimpleParameterReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testIntegerValueReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testDateValueReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testMultipleReplacements(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)

Tests in error:
com.spaceprogram.simplejpa.CacheTests
com.spaceprogram.simplejpa.CacheTests
com.spaceprogram.simplejpa.DomainHelperTests
com.spaceprogram.simplejpa.DomainHelperTests
com.spaceprogram.simplejpa.PerformanceTests
com.spaceprogram.simplejpa.PerformanceTests
com.spaceprogram.simplejpa.PersistenceTests
com.spaceprogram.simplejpa.PersistenceTests
com.spaceprogram.simplejpa.SessionlessTests
com.spaceprogram.simplejpa.SessionlessTests
com.spaceprogram.simplejpa.StatsTests
com.spaceprogram.simplejpa.StatsTests
com.spaceprogram.simplejpa.UtilTests
com.spaceprogram.simplejpa.UtilTests

Tests run: 67, Failures: 5, Errors: 14, Skipped: 1

@mcantrell
Copy link

With the simplejpa.properties file in place (src/test/resources), I get much less errors but it still doesn't pass. I'll attach the surefire-reports for more details information.

Results :

Failed tests:
testNoParameterReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testSimpleParameterReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testIntegerValueReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testDateValueReplacement(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)
testMultipleReplacements(com.spaceprogram.simplejpa.query.SimpleDBQueryTests)

Tests in error:
queryObject(com.spaceprogram.simplejpa.PersistenceTests)
nullingAttributes(com.spaceprogram.simplejpa.PersistenceTests)
queryDownGraph(com.spaceprogram.simplejpa.PersistenceTests)
testDifferentSyntax(com.spaceprogram.simplejpa.PersistenceTests)
testEndsWithQuery(com.spaceprogram.simplejpa.PersistenceTests)

Tests run: 87, Failures: 5, Errors: 5, Skipped: 3

@mcantrell
Copy link

Can't find any way to attach files to this issue. I'll be happy to provide details reports upon request.

@DannyJo
Copy link

DannyJo commented Sep 12, 2011

I've also noticed that some of the tests are actually hitting the AWS platform, the question is if these should be stubbed or mocked because otherwise you will have to supply valid AWS credentials in the test properties file.

Some tests seem to fail because of the query string being asserted against now contains an ` (apostrophe).

@kerryland
Copy link

I just wanted to chime in with a "me too" comment. I'd like to see the tests passing, and perhaps a new jar file that I can rely on, a bit.

@ChristianTellefsen
Copy link
Contributor

First, the build failed on a missing simplejpa.properties file. I added the file, but then got the error quoted below. I also get the same five failed tests as you do.

com.spaceprogram.simplejpa.CacheTests Time elapsed: 0 sec <<< ERROR!
java.lang.IllegalStateException: No setter found for method provided: getProperty
at com.spaceprogram.simplejpa.PersistentMethod.(PersistentMethod.java:28)
at com.spaceprogram.simplejpa.AnnotationInfo.addGetter(AnnotationInfo.java:54)
at com.spaceprogram.simplejpa.AnnotationManager.putMethods(AnnotationManager.java:191)
at com.spaceprogram.simplejpa.AnnotationManager.putAnnotationInfo(AnnotationManager.java:170)
at com.spaceprogram.simplejpa.EntityManagerFactoryImpl.initEntity(EntityManagerFactoryImpl.java:341)
at com.spaceprogram.simplejpa.EntityManagerFactoryImpl.init(EntityManagerFactoryImpl.java:321)
at com.spaceprogram.simplejpa.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:183)
at com.spaceprogram.simplejpa.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:157)
at com.spaceprogram.simplejpa.BaseTestClass.setupEntityManagerFactory(BaseTestClass.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants