Skip to content

Commit 53780f8

Browse files
author
Rakesh Kashyap Hanasoge Padmanabha
committed
Fix failing tests
1 parent 402efe1 commit 53780f8

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

feathr-impl/src/test/scala/com/linkedin/feathr/offline/AnchoredFeaturesIntegTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ class AnchoredFeaturesIntegTest extends FeathrIntegTest {
562562
Row(mutable.WrappedArray.make(Array("")), mutable.WrappedArray.make(Array(1.0f))))
563563
assertEquals(SuppressedExceptionHandlerUtils.missingFeatures,
564564
Set("featureWithNull", "featureWithNull3", "featureWithNull5", "featureWithNull4", "featureWithNull7",
565-
"aEmbedding", "featureWithNull6", "derived_featureWithNull", "seqJoin_featureWithNull"))
565+
"aEmbedding", "featureWithNull6", "derived_featureWithNull", "seqJoin_featureWithNull", "derived_featureWithNull7"))
566566
setFeathrJobParam(ADD_DEFAULT_COL_FOR_MISSING_DATA, "false")
567567
}
568568

feathr-impl/src/test/scala/com/linkedin/feathr/offline/derived/TestSequentialJoinAsDerivation.scala

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import com.linkedin.feathr.offline.job.FeatureTransformation.FEATURE_NAME_PREFIX
1111
import com.linkedin.feathr.offline.join.algorithms.{SeqJoinExplodedJoinKeyColumnAppender, SequentialJoinConditionBuilder, SparkJoinWithJoinCondition}
1212
import com.linkedin.feathr.offline.logical.FeatureGroups
1313
import com.linkedin.feathr.offline.mvel.plugins.FeathrExpressionExecutionContext
14+
import com.linkedin.feathr.offline.util.FeathrUtils
1415
import com.linkedin.feathr.offline.{TestFeathr, TestUtils}
15-
import org.apache.spark.SparkException
16+
import org.apache.spark.{SparkConf, SparkContext, SparkException}
1617
import org.apache.spark.sql.functions.{when => _, _}
1718
import org.apache.spark.sql.types._
1819
import org.apache.spark.sql.{AnalysisException, DataFrame, Row, SparkSession}
@@ -985,6 +986,12 @@ class TestSequentialJoinAsDerivation extends TestFeathr with MockitoSugar {
985986
val mockDerivationFunction = mock[SeqJoinDerivationFunction]
986987
val mockBaseTaggedDependency = mock[BaseTaggedDependency]
987988
val mockTaggedDependency = mock[TaggedDependency]
989+
val mockSparkContext = mock[SparkContext]
990+
val mockSparkConf = mock[SparkConf]
991+
when(mockSparkContext.getConf).thenReturn(mockSparkConf)
992+
when(mockSparkSession.sparkContext).thenReturn(mockSparkContext)
993+
when(mockSparkConf.get(s"${FeathrUtils.FEATHR_PARAMS_PREFIX}${FeathrUtils.ADD_DEFAULT_COL_FOR_MISSING_DATA}", "false"))
994+
.thenReturn("false")
988995
// mock derivation function
989996
when(mockDerivedFeature.derivation.asInstanceOf[SeqJoinDerivationFunction]).thenReturn(mockDerivationFunction)
990997
when(mockDerivedFeature.producedFeatureNames).thenReturn(Seq("seqJoinFeature"))
@@ -1059,6 +1066,13 @@ class TestSequentialJoinAsDerivation extends TestFeathr with MockitoSugar {
10591066
val mockDerivationFunction = mock[SeqJoinDerivationFunction]
10601067
val mockBaseTaggedDependency = mock[BaseTaggedDependency]
10611068
val mockTaggedDependency = mock[TaggedDependency]
1069+
val mockSparkConf = mock[SparkConf]
1070+
val mockSparkContext = mock[SparkContext]
1071+
when(mockSparkSession.sparkContext).thenReturn(mockSparkContext)
1072+
when(mockSparkContext.getConf).thenReturn(mockSparkConf)
1073+
when(mockSparkConf.get(s"${FeathrUtils.FEATHR_PARAMS_PREFIX}${FeathrUtils.ADD_DEFAULT_COL_FOR_MISSING_DATA}",
1074+
"false"))
1075+
.thenReturn("false")
10621076
// mock derivation function
10631077
when(mockDerivedFeature.derivation.asInstanceOf[SeqJoinDerivationFunction]).thenReturn(mockDerivationFunction)
10641078
when(mockDerivedFeature.producedFeatureNames).thenReturn(Seq("seqJoinFeature"))

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=1.0.4-rc4
1+
version=1.0.4-rc5
22
SONATYPE_AUTOMATIC_RELEASE=true
33
POM_ARTIFACT_ID=feathr_2.12

0 commit comments

Comments
 (0)