Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4191

wrong variable naming in an unit test for Outbox Event Router SMT

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Optional Optional
    • 1.8.0.Alpha1
    • None
    • core-library
    • None
    • False
    • False

      following code is from EventRouterTest.java

      Envelope envelope = Envelope.defineSchema()
              .withName("event.Envelope")
              .withRecord(recordSchema)
              .withSource(SchemaBuilder.struct().build())
              .build();
      
      final Struct before = new Struct(recordSchema);
      before.put("id", eventId);
      before.put("aggregatetype", payloadType);
      before.put("aggregateid", payloadId);
      before.put("type", eventType);
      before.put("payload", payload);
      
      extraValues.forEach(before::put);
      
      final Struct body = envelope.create(before, null, Instant.now());
      

      Actually, 'before' should be 'after' because there is no 'before' field in 'create' change event. I think it should be fixed so that the test could help another developers, such as new comer like me, who read this test to try to understand how MySQL Connector works.

            Unassigned Unassigned
            sunghohwang Sungho Hwang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: