Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10360 (closed)

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

Bug: Fix managed repository unit tests

Reported by: mtbcarroll Owned by: mtbcarroll
Priority: minor Milestone: 5.0.0-beta1
Component: OmeroFs Version: n.a.
Keywords: FS Cc: fs@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: FS Demo 2

Description

testSuggestOnConflictPassesWithNonconflictingPaths on instance null(ome.services.blitz.test.utests.ManagedRepositoryITest)	 0.008s	org.jmock.core.DynamicMockError: mockRepositoryDao: no match found
Invoked: ome.services.blitz.repo.RepositoryDao.register(<fake-uuid>, <CheckedPath(template)>, <Directory>, <Ice.Current@82d802b>)
Allowed:
expected once and has been invoked: register, returns <omero.model.OriginalFileI@5d613b53>
expected once and has been invoked: register, returns <omero.model.OriginalFileI@1a7df60a>
expected once and has been invoked: register, returns <omero.model.OriginalFileI@43a4181c>

org.jmock.core.AbstractDynamicMock.mockInvocation(Unknown Source)
org.jmock.core.CoreMock.invoke(Unknown Source)
$Proxy38.register(Unknown Source)
ome.services.blitz.repo.PublicRepositoryI.makeDir(PublicRepositoryI.java:485)
ome.services.blitz.repo.ManagedRepositoryI.suggestOnConflict(ManagedRepositoryI.java:540)
ome.services.blitz.test.utests.ManagedRepositoryITest$TestManagedRepositoryI.suggestOnConflict(ManagedRepositoryITest.java:96)
ome.services.blitz.test.utests.ManagedRepositoryITest.getSuggestion(ManagedRepositoryITest.java:154)
ome.services.blitz.test.utests.ManagedRepositoryITest.testSuggestOnConflictPassesWithNonconflictingPaths(ManagedRepositoryITest.java:191)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
org.testng.TestRunner.runWorkers(TestRunner.java:1125)
org.testng.TestRunner.privateRun(TestRunner.java:749)
org.testng.TestRunner.run(TestRunner.java:600)
org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
org.testng.SuiteRunner.run(SuiteRunner.java:223)
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
org.testng.TestNG.runSuitesSequentially(TestNG.java:1007)
org.testng.TestNG.runSuitesLocally(TestNG.java:932)
org.testng.TestNG.run(TestNG.java:868)
org.testng.TestNG.privateMain(TestNG.java:1150)
org.testng.TestNG.main(TestNG.java:1114)
testSuggestOnConflictReturnsNewPathOnConflict on instance null(ome.services.blitz.test.utests.ManagedRepositoryITest)	 0.004s	org.jmock.core.DynamicMockError: mockRepositoryDao: no match found
Invoked: ome.services.blitz.repo.RepositoryDao.register(<fake-uuid>, <CheckedPath(template)>, <Directory>, <Ice.Current@82d802b>)
Allowed:
expected once and has been invoked: register, returns <omero.model.OriginalFileI@19d03a4e>
expected once and has been invoked: register, returns <omero.model.OriginalFileI@35a3e41f>

org.jmock.core.AbstractDynamicMock.mockInvocation(Unknown Source)
org.jmock.core.CoreMock.invoke(Unknown Source)
$Proxy38.register(Unknown Source)
ome.services.blitz.repo.PublicRepositoryI.makeDir(PublicRepositoryI.java:485)
ome.services.blitz.repo.ManagedRepositoryI.suggestOnConflict(ManagedRepositoryI.java:540)
ome.services.blitz.test.utests.ManagedRepositoryITest$TestManagedRepositoryI.suggestOnConflict(ManagedRepositoryITest.java:96)
ome.services.blitz.test.utests.ManagedRepositoryITest.getSuggestion(ManagedRepositoryITest.java:154)
ome.services.blitz.test.utests.ManagedRepositoryITest.testSuggestOnConflictReturnsNewPathOnConflict(ManagedRepositoryITest.java:204)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
org.testng.TestRunner.runWorkers(TestRunner.java:1125)
org.testng.TestRunner.privateRun(TestRunner.java:749)
org.testng.TestRunner.run(TestRunner.java:600)
org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
org.testng.SuiteRunner.run(SuiteRunner.java:223)
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
org.testng.TestNG.runSuitesSequentially(TestNG.java:1007)
org.testng.TestNG.runSuitesLocally(TestNG.java:932)
org.testng.TestNG.run(TestNG.java:868)
org.testng.TestNG.privateMain(TestNG.java:1150)
org.testng.TestNG.main(TestNG.java:1114)

Change History (8)

comment:1 Changed 7 years ago by jmoore

  • Sprint set to FS Demo 2

Ah, so an extra directory is being registered where previously it wasn't. An extra part of the template?

comment:2 Changed 7 years ago by mtbcarroll

  • Owner set to mtbcarroll

comment:3 Changed 7 years ago by mtbcarroll

  • Status changed from new to accepted

comment:4 Changed 7 years ago by mtbcarroll

  • Milestone changed from OMERO-5 to OMERO-4.5
  • Sprint FS Demo 2 deleted

comment:5 Changed 7 years ago by mtbcarroll

  • Milestone changed from OMERO-4.5 to OMERO-5
  • Sprint set to FS Demo 2

comment:6 Changed 7 years ago by mtbcarroll

oh, looks like milestone and sprint are much intertwined, will just leave as it is...

comment:7 Changed 7 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in https://github.com/joshmoore/openmicroscopy/pull/18

In the longer term, we should come back to these tests and increase their specificity.

(Moving to not-ancient jMock might be nice too.)

comment:8 Changed 7 years ago by jmoore

re: jmock - I leave that choice to you and Blazej, who has similarly mentioned alternatives. Feel free to open a ticket.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.885703 sec.)

We're Hiring!