From 19fc38ad30c0c4e0c72c2f4f8e318a620650dc6e Mon Sep 17 00:00:00 2001 From: Attila Kreiner Date: Thu, 25 Apr 2024 10:39:03 +0200 Subject: [PATCH 1/3] Remove event script in favor of handshake script --- .../runtime/catalog/filesystem/internal/EventIT.java | 4 ++-- .../runtime/catalog/apicurio/internal/EventIT.java | 4 ++-- .../runtime/catalog/karapace/internal/EventIT.java | 4 ++-- .../io/aklivity/zilla/runtime/engine/test/EventIT.java | 4 ++-- .../exporter/stdout/internal/events/EventIT.java | 4 ++-- .../zilla/runtime/guard/jwt/internal/EventIT.java | 4 ++-- .../zilla/runtime/model/avro/internal/EventIT.java | 4 ++-- .../zilla/runtime/model/core/internal/EventIT.java | 4 ++-- .../zilla/runtime/model/json/internal/EventIT.java | 4 ++-- .../zilla/runtime/model/protobuf/internal/EventIT.java | 4 ++-- .../specs/engine/streams/network/event/server.rpt | 4 +++- .../specs/engine/streams/network/handshake/server.rpt | 4 +++- .../zilla/specs/engine/streams/ApplicationIT.java | 10 ---------- .../aklivity/zilla/specs/engine/streams/NetworkIT.java | 10 ---------- 14 files changed, 26 insertions(+), 42 deletions(-) diff --git a/incubator/catalog-filesystem/src/test/java/io/aklivity/zilla/runtime/catalog/filesystem/internal/EventIT.java b/incubator/catalog-filesystem/src/test/java/io/aklivity/zilla/runtime/catalog/filesystem/internal/EventIT.java index 21180d34df..e7b956eb83 100644 --- a/incubator/catalog-filesystem/src/test/java/io/aklivity/zilla/runtime/catalog/filesystem/internal/EventIT.java +++ b/incubator/catalog-filesystem/src/test/java/io/aklivity/zilla/runtime/catalog/filesystem/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/catalog-apicurio/src/test/java/io/aklivity/zilla/runtime/catalog/apicurio/internal/EventIT.java b/runtime/catalog-apicurio/src/test/java/io/aklivity/zilla/runtime/catalog/apicurio/internal/EventIT.java index 0582842292..da43b9915f 100644 --- a/runtime/catalog-apicurio/src/test/java/io/aklivity/zilla/runtime/catalog/apicurio/internal/EventIT.java +++ b/runtime/catalog-apicurio/src/test/java/io/aklivity/zilla/runtime/catalog/apicurio/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/catalog-karapace/src/test/java/io/aklivity/zilla/runtime/catalog/karapace/internal/EventIT.java b/runtime/catalog-karapace/src/test/java/io/aklivity/zilla/runtime/catalog/karapace/internal/EventIT.java index a4865b6e8c..c6cd308749 100644 --- a/runtime/catalog-karapace/src/test/java/io/aklivity/zilla/runtime/catalog/karapace/internal/EventIT.java +++ b/runtime/catalog-karapace/src/test/java/io/aklivity/zilla/runtime/catalog/karapace/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EventIT.java b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EventIT.java index 543bf5ea67..bb43baa392 100644 --- a/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EventIT.java +++ b/runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("server.event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/exporter-stdout/src/test/java/io/aklivity/zilla/runtime/exporter/stdout/internal/events/EventIT.java b/runtime/exporter-stdout/src/test/java/io/aklivity/zilla/runtime/exporter/stdout/internal/events/EventIT.java index b31462dda6..c5b019b33e 100644 --- a/runtime/exporter-stdout/src/test/java/io/aklivity/zilla/runtime/exporter/stdout/internal/events/EventIT.java +++ b/runtime/exporter-stdout/src/test/java/io/aklivity/zilla/runtime/exporter/stdout/internal/events/EventIT.java @@ -55,8 +55,8 @@ public class EventIT @Test @Configuration("server.event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) @Configure(name = STDOUT_OUTPUT_NAME, value = "io.aklivity.zilla.runtime.exporter.stdout.internal.events.StdoutOutputRule.OUT") diff --git a/runtime/guard-jwt/src/test/java/io/aklivity/zilla/runtime/guard/jwt/internal/EventIT.java b/runtime/guard-jwt/src/test/java/io/aklivity/zilla/runtime/guard/jwt/internal/EventIT.java index d6dc34cf9c..b90241f39e 100644 --- a/runtime/guard-jwt/src/test/java/io/aklivity/zilla/runtime/guard/jwt/internal/EventIT.java +++ b/runtime/guard-jwt/src/test/java/io/aklivity/zilla/runtime/guard/jwt/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/model-avro/src/test/java/io/aklivity/zilla/runtime/model/avro/internal/EventIT.java b/runtime/model-avro/src/test/java/io/aklivity/zilla/runtime/model/avro/internal/EventIT.java index c39e60be4d..3045d11789 100644 --- a/runtime/model-avro/src/test/java/io/aklivity/zilla/runtime/model/avro/internal/EventIT.java +++ b/runtime/model-avro/src/test/java/io/aklivity/zilla/runtime/model/avro/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/model-core/src/test/java/io/aklivity/zilla/runtime/model/core/internal/EventIT.java b/runtime/model-core/src/test/java/io/aklivity/zilla/runtime/model/core/internal/EventIT.java index 524c64f591..73f247f551 100644 --- a/runtime/model-core/src/test/java/io/aklivity/zilla/runtime/model/core/internal/EventIT.java +++ b/runtime/model-core/src/test/java/io/aklivity/zilla/runtime/model/core/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/model-json/src/test/java/io/aklivity/zilla/runtime/model/json/internal/EventIT.java b/runtime/model-json/src/test/java/io/aklivity/zilla/runtime/model/json/internal/EventIT.java index f61735b986..a3d2de2cde 100644 --- a/runtime/model-json/src/test/java/io/aklivity/zilla/runtime/model/json/internal/EventIT.java +++ b/runtime/model-json/src/test/java/io/aklivity/zilla/runtime/model/json/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/runtime/model-protobuf/src/test/java/io/aklivity/zilla/runtime/model/protobuf/internal/EventIT.java b/runtime/model-protobuf/src/test/java/io/aklivity/zilla/runtime/model/protobuf/internal/EventIT.java index 3cd3a546fc..f337a652d6 100644 --- a/runtime/model-protobuf/src/test/java/io/aklivity/zilla/runtime/model/protobuf/internal/EventIT.java +++ b/runtime/model-protobuf/src/test/java/io/aklivity/zilla/runtime/model/protobuf/internal/EventIT.java @@ -49,8 +49,8 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", - "${app}/event/server" + "${net}/handshake/client", + "${app}/handshake/server" }) public void shouldLogEvents() throws Exception { diff --git a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt index f48bc644a1..ae395a7387 100644 --- a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt +++ b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt @@ -14,7 +14,9 @@ # under the License. # -accept "zilla://streams/net0" +property serverAddress "zilla://streams/net0" + +accept ${serverAddress} option zilla:window 8192 accepted diff --git a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/handshake/server.rpt b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/handshake/server.rpt index 5867b43b1e..35959c2703 100644 --- a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/handshake/server.rpt +++ b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/handshake/server.rpt @@ -14,7 +14,9 @@ # under the License. # -accept "zilla://streams/net0" +property serverAddress "zilla://streams/net0" + +accept ${serverAddress} option zilla:transmission "duplex" option zilla:window 8192 diff --git a/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/ApplicationIT.java b/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/ApplicationIT.java index e079e617ce..65c49ae5a6 100644 --- a/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/ApplicationIT.java +++ b/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/ApplicationIT.java @@ -128,14 +128,4 @@ public void shouldNotReconfigureWhen500Returned() throws Exception { k3po.finish(); } - - @Test - @Specification({ - "${app}/event/server", - "${app}/event/client", - }) - public void shouldConnect() throws Exception - { - k3po.finish(); - } } diff --git a/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/NetworkIT.java b/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/NetworkIT.java index 4837938048..ff59b85799 100644 --- a/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/NetworkIT.java +++ b/specs/engine.spec/src/test/java/io/aklivity/zilla/specs/engine/streams/NetworkIT.java @@ -128,14 +128,4 @@ public void shouldNotReconfigureWhen500Returned() throws Exception { k3po.finish(); } - - @Test - @Specification({ - "${net}/event/server", - "${net}/event/client" - }) - public void shouldConnect() throws Exception - { - k3po.finish(); - } } From 4b393f64c0652be6e094525382c293e4a674c92f Mon Sep 17 00:00:00 2001 From: Attila Kreiner Date: Thu, 25 Apr 2024 10:43:35 +0200 Subject: [PATCH 2/3] rm --- .../engine/streams/network/event/client.rpt | 20 ---------------- .../engine/streams/network/event/server.rpt | 23 ------------------- 2 files changed, 43 deletions(-) delete mode 100644 specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/client.rpt delete mode 100644 specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt diff --git a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/client.rpt b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/client.rpt deleted file mode 100644 index 73deb25750..0000000000 --- a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/client.rpt +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright 2021-2023 Aklivity Inc. -# -# Aklivity licenses this file to you 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. -# - -connect "zilla://streams/net0" - option zilla:window 8192 - -connected diff --git a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt b/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt deleted file mode 100644 index ae395a7387..0000000000 --- a/specs/engine.spec/src/main/scripts/io/aklivity/zilla/specs/engine/streams/network/event/server.rpt +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright 2021-2023 Aklivity Inc. -# -# Aklivity licenses this file to you 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. -# - -property serverAddress "zilla://streams/net0" - -accept ${serverAddress} - option zilla:window 8192 - -accepted -connected From 7ad844fb43435269b6de7e6bdb8752a9e5181fd3 Mon Sep 17 00:00:00 2001 From: Attila Kreiner Date: Thu, 25 Apr 2024 12:05:18 +0200 Subject: [PATCH 3/3] fix --- .../zilla/runtime/exporter/otlp/internal/EventIT.java | 5 ++++- .../zilla/specs/exporter/otlp/application/event/client.rpt | 6 ------ .../zilla/specs/exporter/otlp/application/event/server.rpt | 6 ------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/runtime/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java b/runtime/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java index 51fe527631..efa6b44ea0 100644 --- a/runtime/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java +++ b/runtime/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java @@ -23,6 +23,7 @@ import org.junit.rules.DisableOnDebug; import org.junit.rules.TestRule; import org.junit.rules.Timeout; +import org.kaazing.k3po.junit.annotation.ScriptProperty; import org.kaazing.k3po.junit.annotation.Specification; import org.kaazing.k3po.junit.rules.K3poRule; @@ -52,9 +53,11 @@ public class EventIT @Test @Configuration("event.yaml") @Specification({ - "${net}/event/client", + "${net}/handshake/client", + "${net}/handshake/server", "${app}/event/server" }) + @ScriptProperty("serverAddress \"zilla://streams/app0\"") public void shouldPostEventLogToOtlpCollector() throws Exception { k3po.finish(); diff --git a/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/client.rpt b/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/client.rpt index 96e3592ace..ac70d76711 100644 --- a/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/client.rpt +++ b/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/client.rpt @@ -13,12 +13,6 @@ # specific language governing permissions and limitations under the License. # -connect "zilla://streams/app0" - option zilla:window 8192 - -connected - - connect "http://localhost:4318/v1/logs" connected diff --git a/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/server.rpt b/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/server.rpt index 4d3ed65ed3..8f79319539 100644 --- a/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/server.rpt +++ b/specs/exporter-otlp.spec/src/main/scripts/io/aklivity/zilla/specs/exporter/otlp/application/event/server.rpt @@ -13,12 +13,6 @@ # specific language governing permissions and limitations under the License. # -accept "zilla://streams/app0" - option zilla:window 8192 -accepted -connected - - accept "http://localhost:4318/v1/logs" accepted connected