@Test public void testDeleteDataSourceMetadata() throws IOException { coordinator.announceHistoricalSegments( ImmutableSet.of(defaultSegment), new ObjectMetadata(null), new ObjectMetadata(ImmutableMap.of("foo", "bar")) ); Assert.assertEquals( new ObjectMetadata(ImmutableMap.of("foo", "bar")), coordinator.getDataSourceMetadata("fooDataSource") ); Assert.assertFalse("deleteInvalidDataSourceMetadata", coordinator.deleteDataSourceMetadata("nonExistentDS")); Assert.assertTrue("deleteValidDataSourceMetadata", coordinator.deleteDataSourceMetadata("fooDataSource")); Assert.assertNull("getDataSourceMetadataNullAfterDelete", coordinator.getDataSourceMetadata("fooDataSource")); }
coordinator.getDataSourceMetadata("fooDataSource") );
failOnceCoordinator.getDataSourceMetadata("fooDataSource") );