diff options
author | Arne H Juul <arnej@yahooinc.com> | 2021-12-10 09:43:05 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2021-12-10 09:49:16 +0000 |
commit | fc7acec41cdef74ecd7c69a4fd376f77702e16e7 (patch) | |
tree | f716bc060025c61ed0e6b1496b09b7530d7de6d9 /document/src/test | |
parent | 175cc78a3934916aa21680c88c3aa09de127a7bd (diff) |
deprecate parts of DocumentTypeManager
* we want to stop using IDs as unique key for DataTypes;
these methods are only used in our own config setup.
* nothing should setup a self-subscribing manager; add a
convenience to create a manager from a config file
to use from unit tests.
Diffstat (limited to 'document/src/test')
-rw-r--r-- | document/src/test/java/com/yahoo/document/DocumentTestCase.java | 3 | ||||
-rw-r--r-- | document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/document/src/test/java/com/yahoo/document/DocumentTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTestCase.java index 3d7eb49f1f9..47605264d44 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTestCase.java @@ -100,6 +100,7 @@ public class DocumentTestCase extends DocumentTestCaseBase { return dcMan; } + @SuppressWarnings("deprecation") public void setUpSertestDocType() { docMan = new DocumentTypeManager(); @@ -877,6 +878,7 @@ public class DocumentTestCase extends DocumentTestCaseBase { doc.setFieldValue("something", testlist); } + @SuppressWarnings("deprecation") @Test public void testCompressionConfiguredIsIgnored() { @@ -1094,6 +1096,7 @@ public class DocumentTestCase extends DocumentTestCaseBase { assertEquals(doc, doc2); } + @SuppressWarnings("deprecation") @Test public void testUnknownFieldsDeserialization() { DocumentTypeManager docTypeManasjer = new DocumentTypeManager(); diff --git a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java index eb5249227be..0aa5aec4b85 100644 --- a/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java +++ b/document/src/test/java/com/yahoo/document/DocumentTypeManagerTestCase.java @@ -59,6 +59,7 @@ public class DocumentTypeManagerTestCase { assertSame(DataType.DOUBLE, doubleType); } + @SuppressWarnings("deprecation") @Test public void testRecursiveRegister() { StructDataType struct = new StructDataType("mystruct"); @@ -87,6 +88,7 @@ public class DocumentTypeManagerTestCase { assertEquals(docType2, manager.getDocumentType(new DataTypeName("myotherdoc"))); } + @SuppressWarnings("deprecation") @Test public void testMultipleDocuments() { DocumentType docType1 = new DocumentType("foo0"); @@ -120,6 +122,7 @@ public class DocumentTypeManagerTestCase { assertEquals(manager.getDocumentTypes().get(new DataTypeName("foo1")), docType2); } + @SuppressWarnings("deprecation") @Test public void testReverseMapOrder() { DocumentTypeManager manager = createConfiguredManager("file:src/test/document/documentmanager.map.cfg"); @@ -501,6 +504,7 @@ search annotationsimplicitstruct { assertReferenceTypePresentInManager(manager, 12345678, "referenced_type"); } + @SuppressWarnings("deprecation") private static void assertReferenceTypePresentInManager(DocumentTypeManager manager, int refTypeId, String refTargetTypeName) { DataType type = manager.getDataType(refTypeId); |