Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21740#discussion_r202531686
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModelSuite.scala
 ---
    @@ -72,6 +72,22 @@ class MatrixFactorizationModelSuite extends 
SparkFunSuite with MLlibTestSparkCon
         }
       }
     
    +  test("invalid user and product") {
    +    val model = new MatrixFactorizationModel(rank, userFeatures, 
prodFeatures)
    +    assert(intercept[IllegalArgumentException]  {
    --- End diff --
    
    I don't think it's necessary to assert about the exact message string. 
Maybe assert it contains the user ID. But just checking for the exception also 
seems close enough.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to