From f85e4aa836fb4c2be5aec3fe89a2f25627016afc Mon Sep 17 00:00:00 2001 From: Rabeea Abu-Saleh Date: Wed, 11 Dec 2019 20:01:40 +0200 Subject: [PATCH] Enabling all disabled tests (#337) * Use core version 1.2.0-beta.1 to resolve the tests issue * remove comments --- .../src/test/java/com/azure/search/IndexingSyncTests.java | 6 ------ .../src/test/java/com/azure/search/LookupAsyncTests.java | 3 --- .../src/test/java/com/azure/search/LookupSyncTests.java | 4 +--- .../src/test/java/com/azure/search/SearchAsyncTests.java | 4 ---- .../src/test/java/com/azure/search/SearchSyncTests.java | 4 ---- .../src/test/java/com/azure/search/SuggestAsyncTests.java | 4 +--- .../src/test/java/com/azure/search/SuggestSyncTests.java | 4 ---- 7 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/IndexingSyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/IndexingSyncTests.java index 0760539df4db5..4e1b4d83218f4 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/IndexingSyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/IndexingSyncTests.java @@ -19,7 +19,6 @@ import com.azure.search.test.environment.models.LoudHotel; import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.text.DateFormat; @@ -302,7 +301,6 @@ public void canUseIndexWithReservedName() { Assert.assertNotNull(actual); } - @Disabled @Test public void canRoundtripBoundaryValues() throws ParseException { createHotelIndex(); @@ -358,7 +356,6 @@ public void dynamicDocumentDateTimesRoundTripAsUtc() { Assert.assertEquals(utcTimeMinusEight.withOffsetSameInstant(ZoneOffset.UTC), ((OffsetDateTime) actualBook2.get("PublishDate")).withOffsetSameInstant(ZoneOffset.UTC)); } - @Disabled @Test public void staticallyTypedDateTimesRoundTripAsUtc() { setupIndexFromJsonFile(BOOKS_INDEX_JSON); @@ -389,7 +386,6 @@ public void staticallyTypedDateTimesRoundTripAsUtc() { Assert.assertEquals(books.get(1).publishDate().withOffsetSameInstant(ZoneOffset.UTC), convertToType(actualBook2, Book.class).publishDate().withOffsetSameInstant(ZoneOffset.UTC)); } - @Disabled @Test public void canMergeStaticallyTypedDocuments() throws ParseException { createHotelIndex(); @@ -523,8 +519,6 @@ public void mergeDocumentWithoutExistingKeyThrowsIndexingException() throws Pars } } - - @Disabled @Test public void canSetExplicitNullsInStaticallyTypedDocument() throws ParseException { createHotelIndex(); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/LookupAsyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/LookupAsyncTests.java index ab2239aba69a9..c38c529ef9684 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/LookupAsyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/LookupAsyncTests.java @@ -8,7 +8,6 @@ import com.azure.search.test.environment.models.HotelRoom; import com.azure.search.test.environment.models.ModelWithPrimitiveCollections; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -29,7 +28,6 @@ public class LookupAsyncTests extends LookupTestBase { private SearchIndexAsyncClient client; - @Disabled @Test public void canGetStaticallyTypedDocument() throws ParseException { createHotelIndex(); @@ -72,7 +70,6 @@ public void canGetStaticallyTypedDocumentWithPascalCaseFields() { .verifyComplete(); } - @Disabled @Test public void canRoundtripStaticallyTypedPrimitiveCollections() { setupIndexFromJsonFile(MODEL_WITH_DATA_TYPES_INDEX_JSON); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/LookupSyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/LookupSyncTests.java index 3d7247c597784..51b60eb6c9057 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/LookupSyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/LookupSyncTests.java @@ -8,8 +8,8 @@ import com.azure.search.test.environment.models.HotelRoom; import com.azure.search.test.environment.models.ModelWithPrimitiveCollections; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + import java.text.ParseException; import java.time.OffsetDateTime; import java.util.Arrays; @@ -25,7 +25,6 @@ public class LookupSyncTests extends LookupTestBase { private SearchIndexClient client; - @Disabled @Test public void canGetStaticallyTypedDocument() throws ParseException { createHotelIndex(); @@ -65,7 +64,6 @@ public void canGetStaticallyTypedDocumentWithPascalCaseFields() { assertReflectionEquals(expected, actual, IGNORE_DEFAULTS); } - @Disabled @Test public void canRoundtripStaticallyTypedPrimitiveCollections() { setupIndexFromJsonFile(MODEL_WITH_DATA_TYPES_INDEX_JSON); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SearchAsyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SearchAsyncTests.java index d42b252fcc280..16be8b99e236a 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SearchAsyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SearchAsyncTests.java @@ -20,7 +20,6 @@ import com.azure.search.test.environment.models.Hotel; import com.azure.search.test.environment.models.NonNullableModel; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @@ -391,7 +390,6 @@ public void canSearchDynamicDocuments() throws IOException { Assert.assertTrue(compareResults(actualResults, hotels)); } - @Disabled @Test public void canSearchStaticallyTypedDocuments() throws IOException { createHotelIndex(); @@ -433,7 +431,6 @@ public void canSearchStaticallyTypedDocuments() throws IOException { assertReflectionEquals(hotelsList, actualResults, IGNORE_DEFAULTS); } - @Disabled @Test public void canRoundTripNonNullableValueTypes() throws Exception { setupIndexFromJsonFile(NON_NULLABLE_INDEX_JSON); @@ -463,7 +460,6 @@ public void canRoundTripNonNullableValueTypes() throws Exception { }).verifyComplete(); } - @Disabled @Test public void canSearchWithDateInStaticModel() throws ParseException, IOException { createHotelIndex(); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SearchSyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SearchSyncTests.java index 14c4113b5c4b3..a6d7d0995e5a3 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SearchSyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SearchSyncTests.java @@ -22,7 +22,6 @@ import com.azure.search.test.environment.models.Hotel; import com.azure.search.test.environment.models.NonNullableModel; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -156,7 +155,6 @@ public void canContinueSearchWithTop() { Assert.assertNull(secondPage.getContinuationToken()); } - @Disabled @Test public void canSearchStaticallyTypedDocuments() throws IOException { createHotelIndex(); @@ -200,7 +198,6 @@ public void canSearchStaticallyTypedDocuments() throws IOException { assertReflectionEquals(hotelsList, actualResults, IGNORE_DEFAULTS); } - @Disabled @Test public void canRoundTripNonNullableValueTypes() throws Exception { setupIndexFromJsonFile(NON_NULLABLE_INDEX_JSON); @@ -233,7 +230,6 @@ public void canRoundTripNonNullableValueTypes() throws Exception { assertReflectionEquals(doc2, convertToType(result.getItems().get(1).getDocument(), NonNullableModel.class), IGNORE_DEFAULTS); } - @Disabled @Test public void canSearchWithDateInStaticModel() throws ParseException, IOException { createHotelIndex(); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SuggestAsyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SuggestAsyncTests.java index 53fafadb1d19f..edc44964dd2f6 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SuggestAsyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SuggestAsyncTests.java @@ -9,7 +9,6 @@ import com.azure.search.test.environment.models.Book; import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.test.StepVerifier; @@ -97,7 +96,6 @@ public void canGetFuzzySuggestions() throws IOException { .verifyComplete(); } - @Disabled @Test public void canSuggestStaticallyTypedDocuments() throws IOException { createHotelIndex(); @@ -216,7 +214,7 @@ public void testCanSuggestWithMinimumCoverage() throws IOException { .assertNext(this::verifyMinimumCoverage) .verifyComplete(); } - @Disabled + @Test public void testTopTrimsResults() throws IOException { createHotelIndex(); diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SuggestSyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SuggestSyncTests.java index b1b5a5793bd8f..02459623aa5e7 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SuggestSyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SuggestSyncTests.java @@ -11,7 +11,6 @@ import com.azure.search.test.environment.models.Book; import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.Assert; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -29,7 +28,6 @@ public class SuggestSyncTests extends SuggestTestBase { private SearchIndexClient client; - @Disabled @Test public void canSuggestDynamicDocuments() throws IOException { createHotelIndex(); @@ -105,7 +103,6 @@ public void canGetFuzzySuggestions() throws IOException { Assert.assertFalse(suggestResultIterator.hasNext()); } - @Disabled @Test public void canSuggestStaticallyTypedDocuments() throws IOException { createHotelIndex(); @@ -229,7 +226,6 @@ public void testCanSuggestWithMinimumCoverage() throws IOException { } - @Disabled @Test public void testTopTrimsResults() throws IOException { createHotelIndex();