You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Rule
public MongoDbRule remoteMongoDbRule = new MongoDbRule(mongoDb()
.databaseName("portfolio_test")
.host("localhost")
.port(27017)
.username("portfolio")
.password("portfolio")
.build());
@Test
@UsingDataSet(locations = "UserDocument.json", loadStrategy = LoadStrategyEnum.CLEAN_INSERT)
public void shouldNotCreateDuplicateCodeUser() {
}
Im getting this stacktrace
java.lang.IllegalArgumentException: Unexpected error reading data set file.
at com.lordofthejars.nosqlunit.mongodb.MongoOperation.insertData(MongoOperation.java:63)
at com.lordofthejars.nosqlunit.mongodb.MongoOperation.insert(MongoOperation.java:46)
at com.lordofthejars.nosqlunit.core.CleanInsertLoadStrategyOperation.executeInsert(CleanInsertLoadStrategyOperation.java:33)
at com.lordofthejars.nosqlunit.core.CleanInsertLoadStrategyOperation.executeScripts(CleanInsertLoadStrategyOperation.java:27)
at com.lordofthejars.nosqlunit.core.AbstractNoSqlTestRule$1.loadDataSet(AbstractNoSqlTestRule.java:273)
at com.lordofthejars.nosqlunit.core.AbstractNoSqlTestRule$1.evaluate(AbstractNoSqlTestRule.java:70)
at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
Caused by: com.mongodb.MongoException: invalid ns to index
at com.mongodb.CommandResult.getException(CommandResult.java:100)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134)
at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:270)
at com.mongodb.DBApiLayer$MyCollection.createIndex(DBApiLayer.java:365)
at com.mongodb.DBCollection.createIndex(DBCollection.java:484)
at com.lordofthejars.nosqlunit.mongodb.DefaultInsertionStrategy.insertIndexes(DefaultInsertionStrategy.java:84)
at com.lordofthejars.nosqlunit.mongodb.DefaultInsertionStrategy.insertParsedData(DefaultInsertionStrategy.java:53)
at com.lordofthejars.nosqlunit.mongodb.DefaultInsertionStrategy.insert(DefaultInsertionStrategy.java:29)
at com.lordofthejars.nosqlunit.mongodb.DefaultInsertionStrategy.insert(DefaultInsertionStrategy.java:15)
at com.lordofthejars.nosqlunit.core.AbstractCustomizableDatabaseOperation.executeInsertion(AbstractCustomizableDatabaseOperation.java:23)
at com.lordofthejars.nosqlunit.mongodb.MongoOperation.insertData(MongoOperation.java:54)
... 23 more
PS: if im removing the "unique" options no error.
The text was updated successfully, but these errors were encountered:
Im using nosqlunit-mongodb-0.7.7, mongodb java driver 2.10.1, with remote mongodb-10gen 2.4.6 con ubuntu
And when im usign this sample
Here my unit test
Im getting this stacktrace
PS: if im removing the "unique" options no error.
The text was updated successfully, but these errors were encountered: