| 1 | /* |
| 2 | * Copyright (C) 2012-2015 DataStax Inc. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package com.datastax.driver.osgi; |
| 17 | |
| 18 | import com.datastax.driver.osgi.api.MailboxException; |
| 19 | import org.ops4j.pax.exam.Configuration; |
| 20 | import org.ops4j.pax.exam.Option; |
| 21 | import org.ops4j.pax.exam.testng.listener.PaxExam; |
| 22 | import org.testng.annotations.Listeners; |
| 23 | import org.testng.annotations.Test; |
| 24 | |
| 25 | import static com.datastax.driver.osgi.BundleOptions.*; |
| 26 | import static org.ops4j.pax.exam.CoreOptions.options; |
| 27 | |
| 28 | @Listeners({CCMBridgeListener.class, PaxExam.class}) |
| 29 | public class MailboxServiceGuava19IT extends MailboxServiceTests { |
| 30 | |
| 31 | @Configuration |
| 32 | public Option[] guava19Config() { |
| 33 | return options( |
| 34 | defaultOptions(), |
| 35 | nettyBundles(), |
| 36 | guavaBundle().version("19.0"), |
| 37 | driverBundle(), |
| 38 | extrasBundle(), |
| 39 | mappingBundle(), |
| 40 | mailboxBundle() |
| 41 | ); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with |
| 46 | * Guava 19 explicitly enforced. |
| 47 | * |
| 48 | * @test_category packaging |
| 49 | * @expected_result Can create, retrieve and delete data using the mailbox service. |
| 50 | * @jira_ticket JAVA-620 |
| 51 | * @since 2.0.10, 2.1.5 |
| 52 | */ |
| 53 | @Test(groups = "short") |
| 54 | public void test_guava_19() throws MailboxException { |
| 55 | checkService(); |
| 56 | } |
| 57 | } |