+1 On Oct 2, 2017 14:53, "Maxim Solodovnik" <solomax...@gmail.com> wrote:
> I'll change the list and the question :))) > > WebSocketTester seems to be not usable in case Application is not destroyed > after it was used once > due to call to "webApplication.getWicketFilter().setFilterPath("");" in > constructor > > I'm going to create PR against `master` to improve this situation. > > What do you think what would be better option to change constructor > https://github.com/apache/wicket/blob/master/wicket- > native-websocket/wicket-native-websocket-core/src/ > main/java/org/apache/wicket/protocol/ws/util/tester/ > WebSocketTester.java#L54 > > from: > webApplication.getWicketFilter().setFilterPath(""); > to > -webApplication.getWicketFilter().setFilterPath(""); > +if (webApplication.getWicketFilter().getFilterPath() == null) > +{ > + webApplication.getWicketFilter().setFilterPath(""); > +} > or to > -webApplication.getWicketFilter().setFilterPath(""); > +setFilterPath(); > > ............... > > // can be overriden in sub-classes > +protected void setFilterPath() > +{ > + webApplication.getWicketFilter().setFilterPath(""); > +} > > > Thanks in advance :) > > > On Mon, Oct 2, 2017 at 10:37 AM, Maxim Solodovnik <solomax...@gmail.com> > wrote: > > > Hello All, > > > > I have started to use WebSocketTester in my tests > > And have noticed weird behavior > > > > This class calls "webApplication.getWicketFilter().setFilterPath("");" > in > > constructor > > FilterPath can be set only once per application :( > > So it is impossible to re-use application in case WebSocketTester. > > > > Can I propose PR to create separate protected I can override and > > conditionally set filter path? > > Or maybe I'm trying to use WebSocketTester incorrectly? > > > > -- > > WBR > > Maxim aka solomax > > > > > > -- > WBR > Maxim aka solomax >