-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start tests for the sticky concurrency limited channel.
- Loading branch information
1 parent
6e8cc51
commit 36e4faf
Showing
2 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...ue-core/src/test/java/com/palantir/dialogue/core/StickyConcurrencyLimitedChannelTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* (c) Copyright 2021 Palantir Technologies Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.palantir.dialogue.core; | ||
|
||
import com.google.common.util.concurrent.SettableFuture; | ||
import com.palantir.dialogue.Endpoint; | ||
import com.palantir.dialogue.Request; | ||
import com.palantir.dialogue.Response; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
public final class StickyConcurrencyLimitedChannelTest { | ||
|
||
@Mock | ||
private Endpoint endpoint; | ||
|
||
@Mock | ||
private Request request; | ||
|
||
@Mock | ||
private LimitedChannel delegate; | ||
|
||
@Mock | ||
private CautiousIncreaseAggressiveDecreaseConcurrencyLimiter mockLimiter; | ||
|
||
@Mock | ||
private Response response; | ||
|
||
private LimitedChannel channel; | ||
private SettableFuture<Response> responseFuture; | ||
|
||
@BeforeEach | ||
public void before() { | ||
channel = new StickyConcurrencyLimitedChannel(delegate, mockLimiter, "test"); | ||
} | ||
|
||
@Test | ||
public void testLimiterAvailable_successfulRequest_host() {} | ||
} |