agave-metadata/metadata-core/src/test/java/org/iplantc/service/metadata/dao/AbstractMetadataDaoIT.java
/**
     * Clears all permissions in the given table
     * @throws Exception
     */
Clears all permissions in the given table
@throws Exception
Clears all permissions in the given table @throws Exception
private void clearCollection() throws Exception {
        try {
            MongoCredential mongoCredential = MongoCredential.createScramSha1Credential(
                    Settings.METADATA_DB_USER, Settings.METADATA_DB_SCHEME, Settings.METADATA_DB_PWD.toCharArray());
            mockClient = new com.mongodb.MongoClient(
                    new ServerAddress(Settings.METADATA_DB_HOST, Settings.METADATA_DB_PORT),
                    mongoCredential,
                    MongoClientOptions.builder().build());
            mockDB = mockClient.getDatabase(Settings.METADATA_DB_SCHEME);
            mockCollection = mockDB.getCollection(Settings.METADATA_DB_COLLECTION, MetadataItem.class);
            mockCollection.deleteMany(new Document());
        } catch (Exception ex) {
            fail("Unable to clear collection");
        }
    }
private void clearCollection ( ) throws Exception { try { MongoCredential mongoCredential = MongoCredential . createScramSha1Credential ( Settings . METADATA_DB_USER , Settings . METADATA_DB_SCHEME , Settings . METADATA_DB_PWD . toCharArray ( ) ) ; mockClient = new com . mongodb . MongoClient ( new ServerAddress ( Settings . METADATA_DB_HOST , Settings . METADATA_DB_PORT ) , mongoCredential , MongoClientOptions . builder ( ) . build ( ) ) ; mockDB = mockClient . getDatabase ( Settings . METADATA_DB_SCHEME ) ; mockCollection = mockDB . getCollection ( Settings . METADATA_DB_COLLECTION , MetadataItem . class ) ; mockCollection . deleteMany ( new Document ( ) ) ; } catch ( Exception ex ) { fail ( "Unable to clear collection" ) ; } }
Clears all permissions in the given table
 @throws Exception
Clears all permissions in the given table @throws Exception