Skip to content

Commit dd2dc56

Browse files
committed
fix ut
Signed-off-by: Hongbin Ma (Mahone) <mahongbin@apache.org>
1 parent e927472 commit dd2dc56

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/src/test/scala/com/nvidia/spark/rapids/unit/GpuScalarUnitTest.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,17 +27,17 @@ class GpuScalarUnitTest extends GpuUnitTests {
2727
test("Test throws exception after closed") {
2828
val gsv = GpuScalar(1, FloatType)
2929
gsv.close()
30-
assertThrows[NullPointerException](gsv.getBase)
31-
assertThrows[NullPointerException](gsv.getValue)
30+
assertThrows[IllegalStateException](gsv.getBase)
31+
assertThrows[IllegalStateException](gsv.getValue)
3232
assertThrows[NullPointerException](gsv.isValid)
33-
assertThrows[NullPointerException](gsv.isNan)
33+
assertThrows[IllegalStateException](gsv.isNan)
3434

3535
val gsc = GpuScalar(Scalar.fromFloat(1), FloatType)
3636
gsc.close()
37-
assertThrows[NullPointerException](gsc.getBase)
38-
assertThrows[NullPointerException](gsc.getValue)
37+
assertThrows[IllegalStateException](gsc.getBase)
38+
assertThrows[IllegalStateException](gsc.getValue)
3939
assertThrows[NullPointerException](gsc.isValid)
40-
assertThrows[NullPointerException](gsc.isNan)
40+
assertThrows[IllegalStateException](gsc.isNan)
4141
}
4242

4343
test("Test closed too many times") {

0 commit comments

Comments
 (0)