mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix missing test cases
This commit is contained in:
parent
aff1bf0645
commit
dd0731d540
6 changed files with 39 additions and 16 deletions
|
|
@ -74,7 +74,9 @@ public class RemoteAngularObjectTest implements AngularObjectRegistryListener {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
"anonymous",
|
||||
false
|
||||
);
|
||||
|
||||
intpGroup.put("note", new LinkedList<Interpreter>());
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ public class RemoteInterpreterOutputTestStream implements RemoteInterpreterProce
|
|||
env,
|
||||
10 * 1000,
|
||||
this,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
intpGroup.get("note").add(intp);
|
||||
intp.setInterpreterGroup(intpGroup);
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public class RemoteInterpreterProcessTest {
|
|||
10 * 1000, null, null);
|
||||
assertFalse(rip.isRunning());
|
||||
assertEquals(0, rip.referenceCount());
|
||||
assertEquals(1, rip.reference(intpGroup));
|
||||
assertEquals(2, rip.reference(intpGroup));
|
||||
assertEquals(1, rip.reference(intpGroup, "anonymous", false));
|
||||
assertEquals(2, rip.reference(intpGroup, "anonymous", false));
|
||||
assertEquals(true, rip.isRunning());
|
||||
assertEquals(1, rip.dereference());
|
||||
assertEquals(true, rip.isRunning());
|
||||
|
|
@ -61,7 +61,7 @@ public class RemoteInterpreterProcessTest {
|
|||
RemoteInterpreterManagedProcess rip = new RemoteInterpreterManagedProcess(
|
||||
INTERPRETER_SCRIPT, "nonexists", "fakeRepo", new HashMap<String, String>(),
|
||||
mock(RemoteInterpreterEventPoller.class), 10 * 1000);
|
||||
rip.reference(intpGroup);
|
||||
rip.reference(intpGroup, "anonymous", false);
|
||||
assertEquals(0, rip.getNumActiveClient());
|
||||
assertEquals(0, rip.getNumIdleClient());
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ public class RemoteInterpreterProcessTest {
|
|||
, 10 * 1000);
|
||||
assertFalse(rip.isRunning());
|
||||
assertEquals(0, rip.referenceCount());
|
||||
assertEquals(1, rip.reference(intpGroup));
|
||||
assertEquals(1, rip.reference(intpGroup, "anonymous", false));
|
||||
assertEquals(true, rip.isRunning());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ public class RemoteInterpreterTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
}
|
||||
|
||||
private RemoteInterpreter createMockInterpreterB(Properties p) {
|
||||
|
|
@ -108,7 +110,9 @@ public class RemoteInterpreterTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -207,7 +211,9 @@ public class RemoteInterpreterTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
|
||||
intpGroup.get("note").add(intpA);
|
||||
|
|
@ -223,7 +229,9 @@ public class RemoteInterpreterTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
intpGroup.get("note").add(intpB);
|
||||
intpB.setInterpreterGroup(intpGroup);
|
||||
|
|
@ -687,7 +695,8 @@ public class RemoteInterpreterTest {
|
|||
//Given
|
||||
final Client client = Mockito.mock(Client.class);
|
||||
final RemoteInterpreter intr = new RemoteInterpreter(new Properties(), "noteId",
|
||||
MockInterpreterA.class.getName(), "runner", "path","localRepo", env, 10 * 1000, null, null);
|
||||
MockInterpreterA.class.getName(), "runner", "path", "localRepo", env, 10 * 1000, null,
|
||||
null, "anonymous", false);
|
||||
final AngularObjectRegistry registry = new AngularObjectRegistry("spark", null);
|
||||
registry.add("name", "DuyHai DOAN", "nodeId", "paragraphId");
|
||||
final InterpreterGroup interpreterGroup = new InterpreterGroup("groupId");
|
||||
|
|
@ -733,7 +742,9 @@ public class RemoteInterpreterTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
intpGroup.put("note", new LinkedList<Interpreter>());
|
||||
intpGroup.get("note").add(intp);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ public class DistributedResourcePoolTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
"anonymous",
|
||||
false
|
||||
);
|
||||
|
||||
intpGroup1 = new InterpreterGroup("intpGroup1");
|
||||
|
|
@ -88,7 +90,9 @@ public class DistributedResourcePoolTest {
|
|||
env,
|
||||
10 * 1000,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
"anonymous",
|
||||
false
|
||||
);
|
||||
|
||||
intpGroup2 = new InterpreterGroup("intpGroup2");
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ public class RemoteSchedulerTest implements RemoteInterpreterProcessListener {
|
|||
env,
|
||||
10 * 1000,
|
||||
this,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
intpGroup.put("note", new LinkedList<Interpreter>());
|
||||
intpGroup.get("note").add(intpA);
|
||||
|
|
@ -170,7 +172,9 @@ public class RemoteSchedulerTest implements RemoteInterpreterProcessListener {
|
|||
env,
|
||||
10 * 1000,
|
||||
this,
|
||||
null);
|
||||
null,
|
||||
"anonymous",
|
||||
false);
|
||||
|
||||
intpGroup.put("note", new LinkedList<Interpreter>());
|
||||
intpGroup.get("note").add(intpA);
|
||||
|
|
|
|||
Loading…
Reference in a new issue