This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
main/java/com/launchdarkly/client
test/java/com/launchdarkly/client Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ final class DefaultEventProcessor implements EventProcessor {
3737 private static final Logger logger = LoggerFactory .getLogger (DefaultEventProcessor .class );
3838 private static final int CHANNEL_BLOCK_MILLIS = 1000 ;
3939 private static final String EVENT_SCHEMA_HEADER = "X-LaunchDarkly-Event-Schema" ;
40- private static final String EVENT_SCHEMA_VERSION = "2 " ;
40+ private static final String EVENT_SCHEMA_VERSION = "3 " ;
4141
4242 private final BlockingQueue <EventProcessorMessage > inputChannel ;
4343 private final ScheduledExecutorService scheduler ;
Original file line number Diff line number Diff line change @@ -410,6 +410,19 @@ public void sdkKeyIsSent() throws Exception {
410410 assertThat (req .getHeader ("Authorization" ), equalTo (SDK_KEY ));
411411 }
412412
413+ @ Test
414+ public void eventSchemaIsSent () throws Exception {
415+ ep = new DefaultEventProcessor (SDK_KEY , configBuilder .build ());
416+ Event e = EventFactory .DEFAULT .newIdentifyEvent (user );
417+ ep .sendEvent (e );
418+
419+ server .enqueue (new MockResponse ());
420+ ep .close ();
421+ RecordedRequest req = server .takeRequest ();
422+
423+ assertThat (req .getHeader ("X-LaunchDarkly-Event-Schema" ), equalTo ("3" ));
424+ }
425+
413426 @ Test
414427 public void http400ErrorIsRecoverable () throws Exception {
415428 testRecoverableHttpError (400 );
You can’t perform that action at this time.
0 commit comments