cleaned tests
This commit is contained in:
parent
5e8f31f384
commit
225b0aacb7
|
@ -37,7 +37,8 @@ public class ContextTest {
|
|||
public static final String DEVSEC;
|
||||
public static final String DEVVRE;
|
||||
|
||||
public static final String ROOT_PROD;
|
||||
private static final String ROOT_PROD;
|
||||
private static final String ROOT_PRE;
|
||||
|
||||
protected static final Properties properties;
|
||||
|
||||
|
@ -54,6 +55,7 @@ public class ContextTest {
|
|||
DEVVRE = DEVSEC + "/devVRE";
|
||||
|
||||
ROOT_PROD = "/d4science.research-infrastructures.eu";
|
||||
ROOT_PRE = "/pred4s";
|
||||
|
||||
DEFAULT_TEST_SCOPE = GCUBE;
|
||||
|
||||
|
@ -162,7 +164,7 @@ public class ContextTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
setContextByName(ROOT_PROD);
|
||||
setContextByName(DEFAULT_TEST_SCOPE);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
|
|
@ -186,7 +186,6 @@ public class PostgreSQLConnectorTest extends ContextTest {
|
|||
@Ignore
|
||||
@Test
|
||||
public void moveStatusFromSrcToDst() throws Exception {
|
||||
ContextTest.setContextByName(ROOT_PROD);
|
||||
AggregatorPersistenceStatusSrc apsSrc = AggregatorPersistenceFactory.getAggregatorPersistenceStatusSrc();
|
||||
List<AggregationStatus> aggregationStatuses = apsSrc.getAll();
|
||||
for(AggregationStatus aggregationStatus : aggregationStatuses) {
|
||||
|
|
|
@ -24,8 +24,6 @@ public class AccountingAggregatorPluginTest extends ContextTest {
|
|||
|
||||
private static Logger logger = LoggerFactory.getLogger(AccountingAggregatorPluginTest.class);
|
||||
|
||||
public static final String ROOT_PROD = "/d4science.research-infrastructures.eu";
|
||||
|
||||
private void aggregate(String recordType, AggregationType aggregationType, Calendar aggregationStartCalendar,
|
||||
Calendar aggregationEndCalendar, boolean forceRerun, boolean forceEarlyAggregation, boolean skipAggregation) throws Exception {
|
||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||
|
@ -79,7 +77,7 @@ public class AccountingAggregatorPluginTest extends ContextTest {
|
|||
|
||||
}
|
||||
|
||||
@Ignore
|
||||
// @Ignore
|
||||
@Test
|
||||
public void aggregateRecordDaily() throws Exception {
|
||||
Set<String> types = new HashSet<>();
|
||||
|
@ -92,8 +90,8 @@ public class AccountingAggregatorPluginTest extends ContextTest {
|
|||
|
||||
for(String recordType : types) {
|
||||
AggregationType aggregationType = AggregationType.DAILY;
|
||||
Calendar aggregationStartCalendar = Utility.getAggregationStartCalendar(2024, Calendar.FEBRUARY, 29);
|
||||
Calendar end = Utility.getAggregationStartCalendar(2024, Calendar.MARCH, 1);
|
||||
Calendar aggregationStartCalendar = Utility.getAggregationStartCalendar(2024, Calendar.MARCH, 1);
|
||||
Calendar end = Utility.getAggregationStartCalendar(2024, Calendar.MARCH, 2);
|
||||
while (aggregationStartCalendar.before(end)) {
|
||||
Calendar aggregationEndCalendar = Utility.getEndCalendarFromStartCalendar(aggregationType, aggregationStartCalendar, 1);
|
||||
aggregate(recordType, aggregationType, aggregationStartCalendar, aggregationEndCalendar, forceRestart, forceEarlyAggregation, false);
|
||||
|
@ -185,9 +183,6 @@ public class AccountingAggregatorPluginTest extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void testRecovery() throws Exception {
|
||||
ContextTest.setContextByName(GCUBE);
|
||||
// ContextTest.setContextByName(ROOT_PROD);
|
||||
|
||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||
|
||||
AggregationType aggregationType = AggregationType.DAILY;
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.gcube.accounting.aggregator.ContextTest;
|
||||
import org.gcube.accounting.aggregator.aggregation.AggregationInfo;
|
||||
import org.gcube.accounting.aggregator.aggregation.AggregationType;
|
||||
import org.gcube.accounting.aggregator.elaboration.Elaborator;
|
||||
|
@ -268,12 +267,9 @@ public class MyTest {
|
|||
|
||||
}
|
||||
|
||||
public static final String ROOT_PROD = "/d4science.research-infrastructures.eu";
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testStorageHub() throws Exception {
|
||||
ContextTest.setContextByName(ROOT_PROD);
|
||||
FolderContainer destinationFolder = null;
|
||||
StorageHubClient storageHubClient = new StorageHubClient();
|
||||
FolderContainer parent = storageHubClient.getWSRoot();
|
||||
|
|
|
@ -9,9 +9,6 @@ public class WorkSpaceManagementTest extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void testCreatedirectory() throws Exception {
|
||||
ContextTest.setContextByName(GCUBE);
|
||||
//ContextTest.setContextByName(AccountingAggregatorPluginTest.ROOT_PROD);
|
||||
|
||||
WorkSpaceManagement workSpaceManagement = WorkSpaceManagement.getInstance();
|
||||
|
||||
FolderContainer root = workSpaceManagement.getWorkspaceRoot();
|
||||
|
|
Loading…
Reference in New Issue