src/test/java/edu/ucla/library/bucketeer/verticles/S3BucketVerticleTest.java
@Test
    public final void testS3Storage(final TestContext aContext) {
        try {
            // Skip this test if we don't have a valid S3 configuration
            assumeTrue(LOGGER.getMessage(MessageCodes.BUCKETEER_012), isExecutable);
        } catch (final AssumptionViolatedException details) {
            LOGGER.warn(details.getMessage());
            throw details;
        }

        final Vertx vertx = myRunTestOnContextRule.vertx();
        final JsonObject message = new JsonObject();
        final Async asyncTask = aContext.async();

        message.put(Constants.IMAGE_ID, myImageKey);
        message.put(Constants.FILE_PATH, JPX_PATH);

        vertx.eventBus().request(VERTICLE_NAME, message, send -> {
            if (send.failed()) {
                final Throwable details = send.cause();

                if (details != null) {
                    LOGGER.error(details, details.getMessage());
                }

                aContext.fail();
            }

            TestUtils.complete(asyncTask);
        });
    }
/**
     * Tests being able to store to S3. This requires an actual S3 configuration. The test will be skipped if no such
     * configuration exists.
     *
     * @param aContext A test context
     */
Tests being able to store to S3. This requires an actual S3 configuration. The test will be skipped if no such
configuration exists.

@param aContext A test context
Tests being able to store to S3 . This requires an actual S3 configuration . The test will be skipped if no such configuration exists . @param aContext A test context
@Test
    public final void testS3Storage(final TestContext aContext) {
        try {
            assumeTrue(LOGGER.getMessage(MessageCodes.BUCKETEER_012), isExecutable);
        } catch (final AssumptionViolatedException details) {
            LOGGER.warn(details.getMessage());
            throw details;
        }
        final Vertx vertx = myRunTestOnContextRule.vertx();
        final JsonObject message = new JsonObject();
        final Async asyncTask = aContext.async();
        message.put(Constants.IMAGE_ID, myImageKey);
        message.put(Constants.FILE_PATH, JPX_PATH);
        vertx.eventBus().request(VERTICLE_NAME, message, send -> {
            if (send.failed()) {
                final Throwable details = send.cause();
                if (details != null) {
                    LOGGER.error(details, details.getMessage());
                }
                aContext.fail();
            }
            TestUtils.complete(asyncTask);
        });
    }
@ Test public final void testS3Storage ( final TestContext aContext ) { try { assumeTrue ( LOGGER . getMessage ( MessageCodes . BUCKETEER_012 ) , isExecutable ) ; } catch ( final AssumptionViolatedException details ) { LOGGER . warn ( details . getMessage ( ) ) ; throw details ; } final Vertx vertx = myRunTestOnContextRule . vertx ( ) ; final JsonObject message = new JsonObject ( ) ; final Async asyncTask = aContext . async ( ) ; message . put ( Constants . IMAGE_ID , myImageKey ) ; message . put ( Constants . FILE_PATH , JPX_PATH ) ; vertx . eventBus ( ) . request ( VERTICLE_NAME , message , send -> { if ( send . failed ( ) ) { final Throwable details = send . cause ( ) ; if ( details != null ) { LOGGER . error ( details , details . getMessage ( ) ) ; } aContext . fail ( ) ; } TestUtils . complete ( asyncTask ) ; } ) ; }
Tests being able to store to S3.
Tests being able to store to S3 .
// Skip this test if we don't have a valid S3 configuration