mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix test
This commit is contained in:
parent
092791e4ab
commit
89d70f29a9
2 changed files with 14 additions and 3 deletions
|
|
@ -312,4 +312,11 @@ public class ZeppelinClient {
|
|||
}
|
||||
watcherSession.getRemote().sendStringByFuture(serialize(new Message(OP.PING)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Only used in test.
|
||||
*/
|
||||
public int countConnectedNotes() {
|
||||
return notesConnection.size();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
package org.apache.zeppelin.notebook.repo.zeppelinhub.websocket;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
|
@ -74,7 +78,7 @@ public class ZeppelinClientTest {
|
|||
assertEquals(connectionB, client.getZeppelinConnection("BBBB"));
|
||||
|
||||
// Remove connection to note AAAA
|
||||
client.removeZeppelinConnection("AAAA");
|
||||
client.removeNoteConnection("AAAA");
|
||||
assertEquals(client.countConnectedNotes(), 1);
|
||||
assertNotEquals(connectionA, client.getZeppelinConnection("AAAA"));
|
||||
assertEquals(client.countConnectedNotes(), 2);
|
||||
|
|
@ -117,7 +121,7 @@ public class ZeppelinClientTest {
|
|||
msg.data = Maps.newHashMap();
|
||||
msg.data.put("key", "value");
|
||||
client.send(msg, "DDDD");
|
||||
client.removeZeppelinConnection("DDDD");
|
||||
//client.removeZeppelinConnection("DDDD");
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue