@@ -0,0 +1,2375 @@
+/***************************************************************************%0A * Copyright 2011 by%0A *  + Christian-Albrechts-University of Kiel%0A *    + Department of Computer Science%0A *      + Software Engineering Group %0A *  and others.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A ***************************************************************************/%0A%0Apackage kieker.test.tools.junit.writeRead.filesystem.brokenLine;%0A%0Aimport java.io.IOException;%0A%0Aimport kieker.analysis.plugin.reader.filesystem.FSReader;%0Aimport kieker.common.configuration.Configuration;%0Aimport kieker.common.record.controlflow.OperationExecutionRecord;%0Aimport kieker.test.tools.junit.writeRead.filesystem.unknownTypes.ContinueAfterUnknownTypeRegularFileTest;%0A%0A/**%0A * We slightly misuse the functionality of %7B@link ContinueAfterUnknownTypeRegularFileTest%7D:%0A * Instead of replacing the type entry by an invalid one, we replace by just another%0A * valid type that does not match the type. We want to make sure that only these records%0A * are ignored, but the readers processes the remaining part of the file.%0A * %0A * @author Andre van Hoorn%0A * %0A */%0Apublic class SkipBrokenRecordsRegularFileTest extends ContinueAfterUnknownTypeRegularFileTest %7B%0A%0A%09/**%0A%09 * Here, we make sure that the reader aborts on the first occurrence of an unknown type%0A%09 * (a case which does not occur in this test).%0A%09 */%0A%09@Override%0A%09protected void refineFSReaderConfiguration(final Configuration config) %7B%0A%09%09config.setProperty(FSReader.CONFIG_PROPERTY_NAME_IGNORE_UNKNOWN_RECORD_TYPES, Boolean.FALSE.toString());%0A%09%7D%0A%0A%09@Override%0A%09protected void doSomethingBeforeReading(final String%5B%5D monitoringLogs) throws IOException %7B%0A%09%09final String classnameToManipulate = EVENT1_UNKNOWN_TYPE.getClass().getName();%0A%09%09this.replaceStringInMapFiles(monitoringLogs, classnameToManipulate, OperationExecutionRecord.class.getName());%0A%09%7D%0A%7D%0A

test for FS reader handling broken lines