Search in sources :

Example 1 with ConcurrentArrayQueue

use of org.eclipse.jetty.util.ConcurrentArrayQueue in project searchcode-server by boyter.

the class CodeIndexerTest method testIndexDocumentsEmptyIssue.

// TODO fix the assert rather then programming by exception
public void testIndexDocumentsEmptyIssue() {
    try {
        CodeIndexDocument cid = new CodeIndexDocument("repoLocationRepoNameLocationFilename", "", "fileName", "fileLocation", "fileLocationFilename", "md5hash", "languageName", 0, null, "repoRemoteLocation", "codeOwner");
        Queue queue = new ConcurrentArrayQueue<CodeIndexDocument>();
        queue.add(cid);
        Singleton.getCodeIndexer().indexDocuments(queue);
    } catch (Exception ex) {
        assertTrue(false);
    }
}
Also used : ConcurrentArrayQueue(org.eclipse.jetty.util.ConcurrentArrayQueue) CodeIndexDocument(com.searchcode.app.dto.CodeIndexDocument) Queue(java.util.Queue) ConcurrentArrayQueue(org.eclipse.jetty.util.ConcurrentArrayQueue) IOException(java.io.IOException)

Aggregations

CodeIndexDocument (com.searchcode.app.dto.CodeIndexDocument)1 IOException (java.io.IOException)1 Queue (java.util.Queue)1 ConcurrentArrayQueue (org.eclipse.jetty.util.ConcurrentArrayQueue)1