waitForRecoveriesToFinish(false);
createAlias("aliascollection", "collection1");
morphline = parse("test-morphlines" + File.separator + "loadSolrBasic", "aliascollection");
Record record = new Record();
record.put(Fields.ID, "id0-innsbruck");
record.put("text", "mytext");
record.put("user_screen_name", "foo");
record.put("first_name", "Nadja"); // will be sanitized
startSession();
assertEquals(1, collector.getNumStartEvents());
Notifications.notifyBeginTransaction(morphline);
assertTrue(morphline.process(record));
record = new Record();
record.put(Fields.ID, "id1-innsbruck");
record.put("text", "mytext1");
record.put("user_screen_name", "foo1");
record.put("first_name", "Nadja1"); // will be sanitized
assertTrue(morphline.process(record));
Record expected = new Record();
expected.put(Fields.ID, "id0-innsbruck");
expected.put("text", "mytext");
expected.put("user_screen_name", "foo");
Iterator<Record> citer = collector.getRecords().iterator();
assertEquals(expected, citer.next());
Record expected2 = new Record();
expected2.put(Fields.ID, "id1-innsbruck");
expected2.put("text", "mytext1");
expected2.put("user_screen_name", "foo1");
assertEquals(expected2, citer.next());
assertFalse(citer.hasNext());
commit();
QueryResponse rsp = cloudClient.query(new SolrQuery("*:*").setRows(100000).addSort(Fields.ID, SolrQuery.ORDER.asc));
//System.out.println(rsp);
Iterator<SolrDocument> iter = rsp.getResults().iterator();
assertEquals(expected.getFields(), next(iter));
assertEquals(expected2.getFields(), next(iter));
assertFalse(iter.hasNext());
Notifications.notifyRollbackTransaction(morphline);
Notifications.notifyShutdown(morphline);