File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
launcher/src/test/java/org/apache/spark/launcher Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2323
2424import org .junit .Before ;
2525import org .junit .Test ;
26+ import static org .mockito .ArgumentMatchers .isNull ;
2627import static org .mockito .Mockito .*;
2728
2829public class SparkSubmitOptionParserSuite extends BaseSuite {
@@ -48,14 +49,17 @@ public void testAllOptions() {
4849 }
4950 }
5051
52+ int nullCount = 0 ;
5153 for (String [] switchNames : parser .switches ) {
5254 int switchCount = 0 ;
5355 for (String name : switchNames ) {
5456 parser .parse (Arrays .asList (name ));
5557 count ++;
58+ nullCount ++;
5659 switchCount ++;
5760 verify (parser , times (switchCount )).handle (eq (switchNames [0 ]), same (null ));
58- verify (parser , times (count )).handle (anyString (), any (String .class ));
61+ verify (parser , times (nullCount )).handle (anyString (), isNull ());
62+ verify (parser , times (count - nullCount )).handle (anyString (), any (String .class ));
5963 verify (parser , times (count )).handleExtraArgs (eq (Collections .emptyList ()));
6064 }
6165 }
You can’t perform that action at this time.
0 commit comments