Changeset View
Changeset View
Standalone View
Standalone View
tests/connectiontest.cpp
Show First 20 Lines • Show All 933 Lines • ▼ Show 20 Line(s) | 907 | { | |||
---|---|---|---|---|---|
934 | KProcess secondProcess; | 934 | KProcess secondProcess; | ||
935 | secondProcess.setProgram(job->process()->program()); | 935 | secondProcess.setProgram(job->process()->program()); | ||
936 | secondProcess.setEnvironment(job->process()->environment()); | 936 | secondProcess.setEnvironment(job->process()->environment()); | ||
937 | secondProcess.setOutputChannelMode(KProcess::ForwardedChannels); | 937 | secondProcess.setOutputChannelMode(KProcess::ForwardedChannels); | ||
938 | secondProcess.start(); | 938 | secondProcess.start(); | ||
939 | 939 | | |||
940 | QTest::qWait(1000); | 940 | QTest::qWait(1000); | ||
941 | 941 | | |||
942 | // FIXME: Is this being handled correctly? | | |||
943 | QVERIFY(!session); | | |||
944 | return; | | |||
945 | | ||||
946 | QVERIFY(session->connection() != firstConnection); //must be a different connection | 942 | QVERIFY(session->connection() != firstConnection); //must be a different connection | ||
947 | 943 | | |||
948 | session->connection()->close(); //close second connection | 944 | session->connection()->close(); //close second connection | ||
949 | QTest::qWait(1000); | 945 | QTest::qWait(1000); | ||
950 | 946 | | |||
951 | // firstConnection->close(); //close first connection _after_ second | | |||
952 | | ||||
953 | QTest::qWait(1000); | | |||
954 | QCOMPARE(session->state(), DebugSession::NotStartedState); //well, it should be EndedState in reality, but this works too | 947 | QCOMPARE(session->state(), DebugSession::NotStartedState); //well, it should be EndedState in reality, but this works too | ||
955 | 948 | | |||
956 | //job seems to gets deleted automatically | 949 | //job seems to gets deleted automatically | ||
957 | } | 950 | } | ||
958 | 951 | | |||
959 | void ConnectionTest::testVariableUpdates() | 952 | void ConnectionTest::testVariableUpdates() | ||
960 | { | 953 | { | ||
961 | QStringList contents; | 954 | QStringList contents; | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |