Skip to content

Commit

Permalink
feat: replace port 8080 with 54321
Browse files Browse the repository at this point in the history
also update any 808x ports
  • Loading branch information
vordimous committed May 31, 2024
1 parent 6427d05 commit d677087
Show file tree
Hide file tree
Showing 1,686 changed files with 2,374 additions and 2,374 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ connect "zilla://streams/app0"
write zilla:begin.ext ${grpc:beginEx()
.typeId(zilla:id("grpc"))
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.service("example.EchoService")
.method("EchoServerStream")
.metadata("custom", "test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ accepted
read zilla:begin.ext ${grpc:matchBeginEx()
.typeId(zilla:id("grpc"))
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.service("example.EchoService")
.method("EchoServerStream")
.metadata("custom", "test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ connect "zilla://streams/app0"
write zilla:begin.ext ${sse:beginEx()
.typeId(zilla:id("sse"))
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.path("/events/a8b7c6d5")
.lastId(null)
.build()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ accepted
read zilla:begin.ext ${sse:beginEx()
.typeId(zilla:id("sse"))
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.path("/events/a8b7c6d5")
.lastId(null)
.build()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ write zilla:begin.ext ${ws:beginEx()
.typeId(zilla:id("ws"))
.protocol(null)
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.path("/echo")
.build()}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ read zilla:begin.ext ${ws:beginEx()
.typeId(zilla:id("ws"))
.protocol(null)
.scheme("http")
.authority("localhost:8080")
.authority("localhost:54321")
.path("/echo")
.build()}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Zilla Frame
Scheme: http
Length: 4
Scheme: http
Authority: localhost:8080
Authority: localhost:54321
Length: 14
Authority: localhost:8080
Authority: localhost:54321
Service: example.EchoService
Length: 19
Service: example.EchoService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Zilla Frame
Scheme: http
Length: 4
Scheme: http
Authority: localhost:8080
Authority: localhost:54321
Length: 14
Authority: localhost:8080
Authority: localhost:54321
Path: /events/a8b7c6d5
Length: 16
Path: /events/a8b7c6d5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Zilla Frame
Scheme: http
Length: 4
Scheme: http
Authority: localhost:8080
Authority: localhost:54321
Length: 14
Authority: localhost:8080
Authority: localhost:54321
Path: /echo
Length: 5
Path: /echo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void decode()
assertEquals("GET", headers.get(":method"));
assertEquals("http", headers.get(":scheme"));
assertEquals("/", headers.get(":path"));
assertEquals("127.0.0.1:8080", headers.get(":authority"));
assertEquals("127.0.0.1:54321", headers.get(":authority"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@ public void shouldReadWith()
String text =
"{" +
"\"scheme\":\"http\"," +
"\"authority\":\"localhost:8080\"" +
"\"authority\":\"localhost:54321\"" +
"}";

KafkaGrpcWithConfig with = jsonb.fromJson(text, KafkaGrpcWithConfig.class);

assertThat(with, not(nullValue()));
assertThat(with.scheme.asString(), equalTo("http"));
assertThat(with.authority.asString(), equalTo("localhost:8080"));
assertThat(with.authority.asString(), equalTo("localhost:54321"));
}

@Test
public void shouldWriteWith()
{
KafkaGrpcWithConfig options = new KafkaGrpcWithConfig(
new String16FW("http"),
new String16FW("localhost:8080"));
new String16FW("localhost:54321"));

String text = jsonb.toJson(options);

assertThat(text, not(nullValue()));
assertThat(text, equalTo(
"{" +
"\"scheme\":\"http\"," +
"\"authority\":\"localhost:8080\"" +
"\"authority\":\"localhost:54321\"" +
"}"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ public void shouldReadOptions()
@Test
public void shouldWriteOptions()
{
String expected = "{\"tcp\":{\"host\":\"localhost\",\"port\":8080},\"tls\":{\"sni\":[\"example.net\"]}," +
String expected = "{\"tcp\":{\"host\":\"localhost\",\"port\":54321},\"tls\":{\"sni\":[\"example.net\"]}," +
"\"specs\":{\"test\":{\"catalog\":{\"catalog0\":{\"subject\":\"petstore\",\"version\":\"latest\"}}}}}";

TcpOptionsConfig tcp = TcpOptionsConfig.builder()
.inject(identity())
.host("localhost")
.ports(new int[] { 8080 })
.ports(new int[] { 54321 })
.build();

TlsOptionsConfig tls = TlsOptionsConfig.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class TcpServerBM
public void reinit() throws Exception
{
engine.start();
//routedId = controller.route(RouteKind.SERVER, "127.0.0.1:8080", "tcp#0").get();
//routedId = controller.route(RouteKind.SERVER, "127.0.0.1:54321", "tcp#0").get();
}

@TearDown(Level.Trial)
Expand Down Expand Up @@ -112,7 +112,7 @@ public GroupState()
public void init() throws Exception
{
channel = SocketChannel.open();
channel.connect(new InetSocketAddress("127.0.0.1", 8080));
channel.connect(new InetSocketAddress("127.0.0.1", 54321));
channel.configureBlocking(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void shouldReadCondition()
"{" +
"\"cidr\": \"127.0.0.0/24\"," +
"\"authority\": \"*.example.net\"," +
"\"port\": 8080" +
"\"port\": 54321" +
"}";

TcpConditionConfig condition = jsonb.fromJson(text, TcpConditionConfig.class);
Expand All @@ -59,7 +59,7 @@ public void shouldReadCondition()
assertThat(condition.authority, equalTo("*.example.net"));
assertThat(condition.ports, not(nullValue()));
assertThat(condition.ports.length, equalTo(1));
assertThat(condition.ports[0], equalTo(8080));
assertThat(condition.ports[0], equalTo(54321));
}

@Test
Expand All @@ -69,13 +69,13 @@ public void shouldWriteCondition()
.inject(identity())
.cidr("127.0.0.0/24")
.authority("*.example.net")
.ports(new int[] { 8080 })
.ports(new int[] { 54321 })
.build();

String text = jsonb.toJson(condition);

assertThat(text, not(nullValue()));
assertThat(text, equalTo("{\"cidr\":\"127.0.0.0/24\",\"authority\":\"*.example.net\",\"port\":8080}"));
assertThat(text, equalTo("{\"cidr\":\"127.0.0.0/24\",\"authority\":\"*.example.net\",\"port\":54321}"));
}

@Test
Expand All @@ -85,16 +85,16 @@ public void shouldReadConditionWithPortRange()
"{" +
"\"cidr\": \"127.0.0.0/24\"," +
"\"authority\": \"*.example.net\"," +
"\"port\": 8080-8081" +
"\"port\": 54321-54322" +
"}";

TcpConditionConfig condition = jsonb.fromJson(text, TcpConditionConfig.class);

assertThat(condition, not(nullValue()));
assertThat(condition.ports, not(nullValue()));
assertThat(condition.ports.length, equalTo(2));
assertThat(condition.ports[0], equalTo(8080));
assertThat(condition.ports[1], equalTo(8081));
assertThat(condition.ports[0], equalTo(54321));
assertThat(condition.ports[1], equalTo(54322));
}

@Test
Expand All @@ -104,14 +104,14 @@ public void shouldReadConditionWithPortRangeSingleton()
"{" +
"\"cidr\": \"127.0.0.0/24\"," +
"\"authority\": \"*.example.net\"," +
"\"port\": \"8080\"" +
"\"port\": \"54321\"" +
"}";

TcpConditionConfig condition = jsonb.fromJson(text, TcpConditionConfig.class);

assertThat(condition, not(nullValue()));
assertThat(condition.ports, not(nullValue()));
assertThat(condition.ports.length, equalTo(1));
assertThat(condition.ports[0], equalTo(8080));
assertThat(condition.ports[0], equalTo(54321));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void shouldReadOptions()
String text =
"{" +
"\"host\": \"localhost\"," +
"\"port\": 8080" +
"\"port\": 54321" +
"}";

TcpOptionsConfig options = jsonb.fromJson(text, TcpOptionsConfig.class);
Expand All @@ -57,7 +57,7 @@ public void shouldReadOptions()
assertThat(options.host, equalTo("localhost"));
assertThat(options.ports, not(nullValue()));
assertThat(options.ports.length, equalTo(1));
assertThat(options.ports[0], equalTo(8080));
assertThat(options.ports[0], equalTo(54321));
}

@Test
Expand All @@ -66,7 +66,7 @@ public void shouldReadOptionsWithPortRange()
String text =
"{" +
"\"host\": \"localhost\"," +
"\"port\": \"8080-8081\"" +
"\"port\": \"54321-54322\"" +
"}";

TcpOptionsConfig options = jsonb.fromJson(text, TcpOptionsConfig.class);
Expand All @@ -75,8 +75,8 @@ public void shouldReadOptionsWithPortRange()
assertThat(options.host, equalTo("localhost"));
assertThat(options.ports, not(nullValue()));
assertThat(options.ports.length, equalTo(2));
assertThat(options.ports[0], equalTo(8080));
assertThat(options.ports[1], equalTo(8081));
assertThat(options.ports[0], equalTo(54321));
assertThat(options.ports[1], equalTo(54322));
}

@Test
Expand All @@ -85,7 +85,7 @@ public void shouldReadOptionsWithPortRangeSingleton()
String text =
"{" +
"\"host\": \"localhost\"," +
"\"port\": \"8080\"" +
"\"port\": \"54321\"" +
"}";

TcpOptionsConfig options = jsonb.fromJson(text, TcpOptionsConfig.class);
Expand All @@ -94,7 +94,7 @@ public void shouldReadOptionsWithPortRangeSingleton()
assertThat(options.host, equalTo("localhost"));
assertThat(options.ports, not(nullValue()));
assertThat(options.ports.length, equalTo(1));
assertThat(options.ports[0], equalTo(8080));
assertThat(options.ports[0], equalTo(54321));
}

@Test
Expand All @@ -103,13 +103,13 @@ public void shouldWriteOptions()
TcpOptionsConfig options = TcpOptionsConfig.builder()
.inject(identity())
.host("localhost")
.ports(new int[] { 8080 })
.ports(new int[] { 54321 })
.build();

String text = jsonb.toJson(options);

assertThat(text, not(nullValue()));
assertThat(text, equalTo("{\"host\":\"localhost\",\"port\":8080}"));
assertThat(text, equalTo("{\"host\":\"localhost\",\"port\":54321}"));
}

@Test
Expand All @@ -118,7 +118,7 @@ public void shouldReadOptionsWithBacklog()
String text =
"{" +
"\"host\": \"localhost\"," +
"\"port\": 8080," +
"\"port\": 54321," +
"\"backlog\": 1000" +
"}";

Expand All @@ -128,7 +128,7 @@ public void shouldReadOptionsWithBacklog()
assertThat(options.host, equalTo("localhost"));
assertThat(options.ports, not(nullValue()));
assertThat(options.ports.length, equalTo(1));
assertThat(options.ports[0], equalTo(8080));
assertThat(options.ports[0], equalTo(54321));
assertThat(options.backlog, equalTo(1000));
}

Expand All @@ -138,13 +138,13 @@ public void shouldWriteOptionsWithBacklog()
TcpOptionsConfig options = TcpOptionsConfig.builder()
.inject(identity())
.host("localhost")
.ports(new int[] { 8080 })
.ports(new int[] { 54321 })
.backlog(1000)
.build();

String text = jsonb.toJson(options);

assertThat(text, not(nullValue()));
assertThat(text, equalTo("{\"host\":\"localhost\",\"port\":8080,\"backlog\":1000}"));
assertThat(text, equalTo("{\"host\":\"localhost\",\"port\":54321,\"backlog\":1000}"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void shouldReportIOExceptionFromReadAsAbortAndReset() throws Exception
try (ServerSocketChannel server = ServerSocketChannel.open())
{
server.setOption(SO_REUSEADDR, true);
server.bind(new InetSocketAddress("127.0.0.1", 8080));
server.bind(new InetSocketAddress("127.0.0.1", 54321));

k3po.start();

Expand All @@ -87,7 +87,7 @@ public void shouldNotResetWhenProcessingEndAfterIOExceptionFromRead() throws Exc
try (ServerSocketChannel server = ServerSocketChannel.open())
{
server.setOption(SO_REUSEADDR, true);
server.bind(new InetSocketAddress("127.0.0.1", 8080));
server.bind(new InetSocketAddress("127.0.0.1", 54321));

k3po.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void shouldAbortAndResetWhenImmediateWriteThrowsIOException() throws Exce
try (ServerSocketChannel server = ServerSocketChannel.open())
{
server.setOption(SO_REUSEADDR, true);
server.bind(new InetSocketAddress("127.0.0.1", 8080));
server.bind(new InetSocketAddress("127.0.0.1", 54321));

k3po.start();

Expand Down Expand Up @@ -112,7 +112,7 @@ public void shouldAbortAndResetWhenDeferredWriteThrowsIOException() throws Excep
try (ServerSocketChannel server = ServerSocketChannel.open())
{
server.setOption(SO_REUSEADDR, true);
server.bind(new InetSocketAddress("127.0.0.1", 8080));
server.bind(new InetSocketAddress("127.0.0.1", 54321));

k3po.start();

Expand Down
Loading

0 comments on commit d677087

Please sign in to comment.