OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 */ | 34 */ |
35 @RunWith(LocalRobolectricTestRunner.class) | 35 @RunWith(LocalRobolectricTestRunner.class) |
36 @Config(manifest = Config.NONE) | 36 @Config(manifest = Config.NONE) |
37 public class DirectRTCClientTest { | 37 public class DirectRTCClientTest { |
38 private static final String ROOM_URL = ""; | 38 private static final String ROOM_URL = ""; |
39 private static final boolean LOOPBACK = false; | 39 private static final boolean LOOPBACK = false; |
40 | 40 |
41 private static final String DUMMY_SDP_MID = "sdpMid"; | 41 private static final String DUMMY_SDP_MID = "sdpMid"; |
42 private static final String DUMMY_SDP = "sdp"; | 42 private static final String DUMMY_SDP = "sdp"; |
43 | 43 |
44 public static final int SERVER_WAIT = 10; | 44 public static final int SERVER_WAIT = 100; |
45 public static final int NETWORK_TIMEOUT = 100; | 45 public static final int NETWORK_TIMEOUT = 1000; |
46 | 46 |
47 private DirectRTCClient client; | 47 private DirectRTCClient client; |
48 private DirectRTCClient server; | 48 private DirectRTCClient server; |
49 | 49 |
50 AppRTCClient.SignalingEvents clientEvents; | 50 AppRTCClient.SignalingEvents clientEvents; |
51 AppRTCClient.SignalingEvents serverEvents; | 51 AppRTCClient.SignalingEvents serverEvents; |
52 | 52 |
53 @Before | 53 @Before |
54 public void setUp() { | 54 public void setUp() { |
55 clientEvents = mock(AppRTCClient.SignalingEvents.class); | 55 clientEvents = mock(AppRTCClient.SignalingEvents.class); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 .onRemoteIceCandidate(isNotNull(IceCandidate.class)); | 141 .onRemoteIceCandidate(isNotNull(IceCandidate.class)); |
142 | 142 |
143 client.disconnectFromRoom(); | 143 client.disconnectFromRoom(); |
144 verify(clientEvents, timeout(NETWORK_TIMEOUT)).onChannelClose(); | 144 verify(clientEvents, timeout(NETWORK_TIMEOUT)).onChannelClose(); |
145 verify(serverEvents, timeout(NETWORK_TIMEOUT)).onChannelClose(); | 145 verify(serverEvents, timeout(NETWORK_TIMEOUT)).onChannelClose(); |
146 | 146 |
147 verifyNoMoreInteractions(clientEvents); | 147 verifyNoMoreInteractions(clientEvents); |
148 verifyNoMoreInteractions(serverEvents); | 148 verifyNoMoreInteractions(serverEvents); |
149 } | 149 } |
150 } | 150 } |
OLD | NEW |