Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,21 @@ void lazyClearAfterSave(@Autowired final ObjectWithLazyRepository<SimpleObject>
);
}

@Test
void lazyClearThroughLazyManagerBeforeSave()
{
LazyReferenceManager.get().stop();
this.configuration.getStorageInstance().start();
final ObjectWithLazy<SimpleObject> newLazy = new ObjectWithLazy<>();
final SimpleObject objectToStore = new SimpleObject(TestData.DUMMY_STRING);
newLazy.setLazy(SpringDataEclipseStoreLazy.build(objectToStore));
Assertions.assertTrue(newLazy.getLazy().isLoaded());
Assertions.assertFalse(newLazy.getLazy().isStored());
LazyReferenceManager.get().cleanUp();
Assertions.assertTrue(newLazy.getLazy().isLoaded());
Assertions.assertFalse(newLazy.getLazy().isStored());
}

@Test
void lazyClearThroughLazyManagerAfterSave(@Autowired final ObjectWithLazyRepository<SimpleObject> repository)
{
Expand Down