2016-04-08 11:36:08 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
|
|
/*
|
2023-11-09 12:23:00 -06:00
|
|
|
* Copyright the Collabora Online contributors.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*
|
2016-04-08 11:36:08 -05:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2017-12-20 07:06:26 -06:00
|
|
|
#include <config.h>
|
2017-03-08 10:38:22 -06:00
|
|
|
|
2021-03-25 08:47:10 -05:00
|
|
|
#include <chrono>
|
|
|
|
|
2019-11-06 03:07:32 -06:00
|
|
|
#include <sysexits.h>
|
loolwsd: include cleanup and organization
A source file (.cpp) must include its own header first.
This insures that the header is self-contained and
doesn't depend on arbitrary (and accidental) includes
before it to compile.
Furthermore, system headers should go next, followed by
C then C++ headers, then libraries (Poco, etc) and, finally,
project headers come last.
This makes sure that headers and included in the same dependency
order to avoid side-effects. For example, Poco should never rely on
anything from our project in the same way that a C header should
never rely on anything in C++, Poco, or project headers.
Also, includes ought to be sorted where possible, to improve
readability and avoid accidental duplicates (of which there
were a few).
Change-Id: I62cc1343e4a091d69195e37ed659dba20cfcb1ef
Reviewed-on: https://gerrit.libreoffice.org/25262
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 09:23:07 -05:00
|
|
|
|
2017-12-20 07:06:26 -06:00
|
|
|
#include <Log.hpp>
|
|
|
|
#include <Util.hpp>
|
|
|
|
#include <Unit.hpp>
|
2016-04-08 11:36:08 -05:00
|
|
|
|
2016-04-09 11:30:48 -05:00
|
|
|
class UnitTimeout : public UnitWSD
|
2016-04-08 11:36:08 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
UnitTimeout()
|
2022-04-21 18:14:16 -05:00
|
|
|
: UnitWSD("UnitTimeout")
|
2016-04-08 11:36:08 -05:00
|
|
|
{
|
2022-03-13 17:28:31 -05:00
|
|
|
setTimeout(std::chrono::seconds(1));
|
2016-04-08 11:36:08 -05:00
|
|
|
}
|
2020-12-14 13:00:55 -06:00
|
|
|
|
2022-11-12 07:19:42 -06:00
|
|
|
virtual void timeout() override { passTest("Timed out as expected"); }
|
2016-04-08 11:36:08 -05:00
|
|
|
};
|
|
|
|
|
2022-11-12 07:19:42 -06:00
|
|
|
UnitBase* unit_create_wsd(void) { return new UnitTimeout(); }
|
2016-04-08 11:36:08 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|