Re: CachingTokenFilter tests fail when using MockTokenizer

2015-03-24 Thread Spyros Kapnissis
://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Spyros Kapnissis [mailto:ska...@yahoo.com.INVALID] > Sent: Monday, March 23, 2015 11:02 PM > To: java-user@lucene.apache.org; Ahmet Arslan > Subject: Re: CachingTokenFilter tests fail when using MockTokenizer &

RE: CachingTokenFilter tests fail when using MockTokenizer

2015-03-23 Thread Uwe Schindler
NVALID] > Sent: Monday, March 23, 2015 11:02 PM > To: java-user@lucene.apache.org; Ahmet Arslan > Subject: Re: CachingTokenFilter tests fail when using MockTokenizer > > Hello Ahmet, > Unfortunately the test still fails with the same error: "end() called before > incrementTo

Re: CachingTokenFilter tests fail when using MockTokenizer

2015-03-23 Thread Spyros Kapnissis
Hello Ahmet,  Unfortunately the test still fails with the same error: "end() called before incrementToken() returned false!". I am not sure if I am misusing CachingTokenFilter, or if it cannot be used with MockTokenizer, since it "always calls end() before incrementToken() returns false". Spyros

Re: CachingTokenFilter tests fail when using MockTokenizer

2015-03-23 Thread Ahmet Arslan
Hi Spyros, Not 100% sure but I think you should override reset method. @Override public void reset() throws IOException { super.reset(); cachedInput = null; } Ahmet On Monday, March 23, 2015 1:29 PM, Spyros Kapnissis wrote: Hello, We have a couple of custom token filters that use CachingTo

CachingTokenFilter tests fail when using MockTokenizer

2015-03-23 Thread Spyros Kapnissis
Hello,  We have a couple of custom token filters that use CachingTokenFilter internally. However, when we try to test them with MockTokenizer so that we can have these nice TokenStream API checks that it provides, the tests fail with: "java.lang.AssertionError: end() called before incrementToken