From dac96c489f1bd78ad3538fa86aa09ae8d4df37e2 Mon Sep 17 00:00:00 2001 From: Anand Date: Tue, 31 Dec 2019 13:40:05 +0530 Subject: [PATCH 1/2] Issue #000 feat: Disable tests in Jenkinsfile --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 079dd9e06..4af884d2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,10 +33,10 @@ node('build-slave') { } stage('Build') { sh ''' - cd platform-framework && mvn clean install - cd ../platform-modules && mvn clean install - cd job-manager && mvn clean package - cd ../../platform-api && mvn test + cd platform-framework && mvn clean install -DskipTests + cd ../platform-modules && mvn clean install -DskipTests + cd job-manager && mvn clean package -DskipTests + cd ../../platform-api sed -i "s#>logs<#>/mount/data/analytics/logs/api-service<#g" analytics-api/conf/log4j2.xml sed -i 's#${application.home:-.}/logs#/mount/data/analytics/logs/api-service#g' analytics-api/conf/logback.xml mvn clean install -DskipTests From 840e985e420a5cdc8e91f20347fd3073e808ca4c Mon Sep 17 00:00:00 2001 From: Sowmya N Dixit Date: Tue, 31 Dec 2019 14:54:38 +0530 Subject: [PATCH 2/2] Issue #0000 refactor:Fix getMonthRange method in api CommonUtil --- .../scala/org/ekstep/analytics/api/util/CommonUtil.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform-api/analytics-api-core/src/main/scala/org/ekstep/analytics/api/util/CommonUtil.scala b/platform-api/analytics-api-core/src/main/scala/org/ekstep/analytics/api/util/CommonUtil.scala index 8bded5fb3..cae62feee 100644 --- a/platform-api/analytics-api-core/src/main/scala/org/ekstep/analytics/api/util/CommonUtil.scala +++ b/platform-api/analytics-api-core/src/main/scala/org/ekstep/analytics/api/util/CommonUtil.scala @@ -66,8 +66,8 @@ object CommonUtil { def getMonthRange(count: Int): Range = { val endDate = DateTime.now(DateTimeZone.UTC); - val startDate = endDate.minusDays(count * 30); - Range(monthPeriod.print(startDate).toInt, monthPeriod.print(endDate).toInt) + val startMonth = endDate.minusMonths(count); + Range(monthPeriod.print(startMonth).toInt, monthPeriod.print(endDate).toInt) } def errorResponse(apiId: String, err: String, responseCode: String): Response = { @@ -124,4 +124,4 @@ object CommonUtil { map + (field.getName -> field.get(ccObj)) } -} \ No newline at end of file +}