/** Create a capped collection. If you create an uncapped collections the tests go green. */
  @Before
  public void setUp() {
    template.dropCollection(COLLECTION_NAME);

    // capped
    template.createCollection(COLLECTION_NAME, new CollectionOptions(1000, 5, true));

    // uncapped
    // template.createCollection(COLLECTION_NAME);
  }
 /** Drops the entity model collection. */
 public void dropCollection() {
   mongoOperations.dropCollection(model);
 }
Ejemplo n.º 3
0
 @Override
 public void removerTodos() {
   mongoOperations.dropCollection(Template.class);
 }
 public static void dropDatabase(MongoOperations mongoTemplate) {
   mongoTemplate.dropCollection(Rider.class);
   mongoTemplate.dropCollection(RideRequest.class);
   mongoTemplate.dropCollection(RideBooking.class);
   mongoTemplate.dropCollection(RideProposal.class);
 }
 @After
 public void cleanDb() {
   log.info("Cleaning...");
   mongoOps.dropCollection(Employee.class);
 }