sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() — netty Function Reference
Architecture documentation for the sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() function in WeightedFairQueueByteDistributorDependencyTreeTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5213972e_66a1_578e_b980_063dfade6a6b["sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree()"] f59fdba5_c411_919e_8d09_ef11c6679e0d["WeightedFairQueueByteDistributorDependencyTreeTest"] 5213972e_66a1_578e_b980_063dfade6a6b -->|defined in| f59fdba5_c411_919e_8d09_ef11c6679e0d style 5213972e_66a1_578e_b980_063dfade6a6b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java lines 577–611
@Test
public void sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() throws Http2Exception {
Http2Stream streamA = connection.local().createStream(1, false);
Http2Stream streamB = connection.local().createStream(3, false);
Http2Stream streamC = connection.local().createStream(5, false);
Http2Stream streamD = connection.local().createStream(7, false);
setPriority(streamB.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT, false);
setPriority(streamC.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT, false);
setPriority(streamD.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT, true);
boolean[] exclusives = { true, false };
short[] weights = { DEFAULT_PRIORITY_WEIGHT, 100, 200, DEFAULT_PRIORITY_WEIGHT };
assertEquals(4, connection.numActiveStreams());
// The goal is to call setPriority with the same parent and vary the parameters
// we were at one point adding a circular depends to the tree and then throwing
// a StackOverflow due to infinite recursive operation.
for (short weight : weights) {
for (boolean exclusive : exclusives) {
setPriority(streamD.id(), streamA.id(), weight, exclusive);
assertEquals(0, distributor.numChildren(streamB.id()));
assertEquals(0, distributor.numChildren(streamC.id()));
assertEquals(1, distributor.numChildren(streamA.id()));
assertEquals(2, distributor.numChildren(streamD.id()));
assertFalse(distributor.isChild(streamB.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT));
assertFalse(distributor.isChild(streamC.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT));
assertTrue(distributor.isChild(streamB.id(), streamD.id(), DEFAULT_PRIORITY_WEIGHT));
assertTrue(distributor.isChild(streamC.id(), streamD.id(), DEFAULT_PRIORITY_WEIGHT));
assertTrue(distributor.isChild(streamD.id(), streamA.id(), weight));
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() do?
sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java.
Where is sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() defined?
sameNodeDependentShouldNotStackOverflowNorChangePrioritizableForTree() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java at line 577.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free