Commit c3bf72cd by Shwetha GS

ATLAS-1273 Test testOnChangeRefresh in DefaultMetadataServiceTest is failing…

ATLAS-1273 Test testOnChangeRefresh in DefaultMetadataServiceTest is failing (ayubkhan via shwethags)
parent def9e385
......@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ATLAS-1273 Test testOnChangeRefresh in DefaultMetadataServiceTest is failing (ayubkhan via shwethags)
Atlas web server allows user to browse webapp directory (vrathor-hw via shwethags)
ATLAS-1241 New Instance APIs and POJOs (sumasai)
ATLAS-1259 Fix Test and compilation failure caused bt ATLAS-1233 changes (apoorvnaik via sumasai)
......
......@@ -77,6 +77,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Collections;
import static org.apache.atlas.TestUtils.COLUMNS_ATTR_NAME;
import static org.apache.atlas.TestUtils.COLUMN_TYPE;
......@@ -1138,11 +1139,16 @@ public class DefaultMetadataServiceTest {
@Test
public void testOnChangeRefresh() {
try {
List<String> beforeChangeTypeNames = metadataService.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>());
List<String> beforeChangeTypeNames = new ArrayList<>();
beforeChangeTypeNames.addAll(metadataService.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>()));
((DefaultMetadataService)metadataService).onChange(new ChangedTypeDefs());
List<String> afterChangeTypeNames = metadataService.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>());
List<String> afterChangeTypeNames = new ArrayList<>();
afterChangeTypeNames.addAll(metadataService.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>()));
Collections.sort(beforeChangeTypeNames);
Collections.sort(afterChangeTypeNames);
assertEquals(afterChangeTypeNames, beforeChangeTypeNames);
} catch (AtlasBaseException e) {
fail("Should've succeeded", e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment