File tree Expand file tree Collapse file tree 6 files changed +34
-6
lines changed
main/java/io/split/integrations
test/java/io/split/client Expand file tree Collapse file tree 6 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 3838
3939 steps :
4040 - name : Checkout code
41- uses : actions/checkout@v3
41+ uses : actions/checkout@v4
4242 with :
4343 fetch-depth : 0
4444
Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : Checkout
16- uses : actions/checkout@v3
16+ uses : actions/checkout@v4
1717 with :
1818 fetch-depth : 0
1919
2424 run : " echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV"
2525
2626 - name : Update LICENSE
27- uses : jacobtomlinson/gha-find-replace@v2
27+ uses : jacobtomlinson/gha-find-replace@v3
2828 with :
2929 find : ${{ env.PREVIOUS }}
3030 replace : ${{ env.CURRENT }}
3838 git commit -m "Updated License Year" -a
3939
4040 - name : Create Pull Request
41- uses : peter-evans/create-pull-request@v3
41+ uses : peter-evans/create-pull-request@v5
4242 with :
4343 token : ${{ secrets.GITHUB_TOKEN }}
4444 title : Update License Year
Original file line number Diff line number Diff line change 1+ 4.11.0 (Jan 9, 2024)
2+ - Added impressionsListener method in the IntegrationConfig builder to set Sync or Async Listener execution.
3+
144.10.2 (Dec 1, 2023)
25- Added getTreatmentsByFlagSets without attributes.
36- Fixed some issues for flag sets: Not logging a warning when using flag sets that don't contain cached feature flags.
Original file line number Diff line number Diff line change 1- Copyright © 2023 Split Software, Inc.
1+ Copyright © 2024 Split Software, Inc.
22
33Licensed under the Apache License, Version 2.0 (the "License");
44you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change @@ -51,10 +51,14 @@ public Builder() {
5151 }
5252
5353 public Builder impressionsListener (ImpressionListener listener , int queueSize ) {
54+ return impressionsListener (listener , queueSize , Execution .ASYNC );
55+ }
56+
57+ public Builder impressionsListener (ImpressionListener listener , int queueSize , Execution executionType ) {
5458 if (queueSize <= 0 ) {
5559 throw new IllegalArgumentException ("An ImpressionListener was provided, but its capacity was non-positive: " + queueSize );
5660 }
57- _listeners .add (new ImpressionListenerWithMeta (listener , Execution . ASYNC , queueSize ));
61+ _listeners .add (new ImpressionListenerWithMeta (listener , executionType , queueSize ));
5862 return this ;
5963 }
6064
Original file line number Diff line number Diff line change 77import io .split .integrations .IntegrationsConfig ;
88import org .junit .Assert ;
99import org .junit .Test ;
10+ import org .mockito .Mockito ;
1011
1112import java .util .List ;
1213import java .util .stream .Collectors ;
@@ -214,4 +215,24 @@ public void threadFactoryNotNull() {
214215 SplitClientConfig config = SplitClientConfig .builder ().threadFactory (new ThreadFactoryBuilder ().build ()).build ();
215216 Assert .assertNotNull (config .getThreadFactory ());
216217 }
218+
219+ @ Test
220+ public void IntegrationConfigSyncNotNull () {
221+ SplitClientConfig config = SplitClientConfig .builder ().integrations (IntegrationsConfig .builder ()
222+ .impressionsListener (Mockito .mock (ImpressionListener .class ), 500 , IntegrationsConfig .Execution .SYNC )
223+ .build ()).build ();
224+ Assert .assertNotNull (config .integrationsConfig ());
225+ Assert .assertEquals (1 , config .integrationsConfig ().getImpressionsListeners (IntegrationsConfig .Execution .SYNC ).size ());
226+ Assert .assertEquals (0 , config .integrationsConfig ().getImpressionsListeners (IntegrationsConfig .Execution .ASYNC ).size ());
227+ }
228+
229+ @ Test
230+ public void IntegrationConfigAsyncNotNull () {
231+ SplitClientConfig config = SplitClientConfig .builder ().integrations (IntegrationsConfig .builder ()
232+ .impressionsListener (Mockito .mock (ImpressionListener .class ), 500 , IntegrationsConfig .Execution .ASYNC )
233+ .build ()).build ();
234+ Assert .assertNotNull (config .integrationsConfig ());
235+ Assert .assertEquals (0 , config .integrationsConfig ().getImpressionsListeners (IntegrationsConfig .Execution .SYNC ).size ());
236+ Assert .assertEquals (1 , config .integrationsConfig ().getImpressionsListeners (IntegrationsConfig .Execution .ASYNC ).size ());
237+ }
217238}
You can’t perform that action at this time.
0 commit comments