You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/03/07 18:10:21 UTC

[pulsar] branch branch-2.8 updated (8edfdb5 -> 0f72a4f)

This is an automated email from the ASF dual-hosted git repository.

mmarshall pushed a change to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git.


    from 8edfdb5  [branch-2.8] [flaky tests] Fix flaky test ReplicatorTest.testRemoveClusterFromNamespace (#14535)
     new c773179  Flaky Tests: AdminApiSchemaTest#testSchemaInfoApi (#12461)
     new 0f72a4f  [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (#14508)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/test/java/org/apache/pulsar/schema/SchemaTest.java          | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

[pulsar] 02/02: [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (#14508)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmarshall pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 0f72a4ff1f21ecf9815290a78be2ab2ea48cecc7
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Mon Mar 7 18:00:57 2022 +0100

    [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (#14508)
    
    * [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi
    
    * use custom json schema
    
    * remove old comment
    
    ### Motivation
    This is the same fix applied here #12461. The problem with the other pull is that the `AbstractSchema#clone()` method does return the same instance, so the fix is not useful at all.
    
    I see this test also failing in 2.8 and 2.9 branch, I recommend to cherry-pick it.
    
    ### Modifications
    * Create a new INT schema for the test purpose
    
    - [x] `no-need-doc`
    
    (cherry picked from commit 32c3cd1009eea884e0701143fe01dadf4556e73b)
---
 pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
index 999b264..d1340c1 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
@@ -703,8 +703,7 @@ public class SchemaTest extends MockedPulsarServiceBaseTest {
         map.put("key", null);
         map.put(null, "value"); // null key is not allowed for JSON, it's only for test here
 
-        // leave INT32 instance unchanged
-        final Schema<Integer> integerSchema = Schema.INT32.clone();
+        final Schema<Integer> integerSchema = Schema.JSON(Integer.class);
         ((SchemaInfoImpl) integerSchema.getSchemaInfo()).setProperties(map);
 
         final Consumer<Integer> consumer = pulsarClient.newConsumer(integerSchema).topic(topic)

[pulsar] 01/02: Flaky Tests: AdminApiSchemaTest#testSchemaInfoApi (#12461)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mmarshall pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit c773179dcd5a16edd95714c3aa5a6c19eaa394fe
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Thu Nov 11 18:16:49 2021 +0100

    Flaky Tests: AdminApiSchemaTest#testSchemaInfoApi (#12461)
    
    (cherry picked from commit b533fe5825d236415d8bf07fcaaccd8750b63271)
---
 .../src/test/java/org/apache/pulsar/schema/SchemaTest.java         | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
index bbea161..999b264 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
@@ -702,9 +702,12 @@ public class SchemaTest extends MockedPulsarServiceBaseTest {
         final Map<String, String> map = new HashMap<>();
         map.put("key", null);
         map.put(null, "value"); // null key is not allowed for JSON, it's only for test here
-        ((SchemaInfoImpl)Schema.INT32.getSchemaInfo()).setProperties(map);
 
-        final Consumer<Integer> consumer = pulsarClient.newConsumer(Schema.INT32).topic(topic)
+        // leave INT32 instance unchanged
+        final Schema<Integer> integerSchema = Schema.INT32.clone();
+        ((SchemaInfoImpl) integerSchema.getSchemaInfo()).setProperties(map);
+
+        final Consumer<Integer> consumer = pulsarClient.newConsumer(integerSchema).topic(topic)
                 .subscriptionName("sub")
                 .subscribe();
         consumer.close();