Skip to content

Commit 051c15e

Browse files
committed
Make the test work despite the workaround
1 parent 944edf2 commit 051c15e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/test/java/org/purejava/UnlockedDatabaseTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@
1919
public class UnlockedDatabaseTest {
2020
private static final Logger log = LoggerFactory.getLogger(UnlockedDatabaseTest.class);
2121

22-
private KeepassProxyAccess kpa = new KeepassProxyAccess();
22+
private final KeepassProxyAccess kpa = new KeepassProxyAccess();
2323

2424
@Test
2525
@Order(3)
2626
@DisplayName("Testing KeePassXC proxy functionality")
27-
public void shouldHaveNoErrors() {
28-
log.info("Please enter a name for the connection in the pop-up");
27+
public void shouldHaveNoErrors() throws InterruptedException {
28+
log.info("Please enter a name for the connection in the pop-up within 10 seconds");
2929
assertTrue(kpa.connect());
3030
assertTrue(kpa.associate());
31+
// TODO:
32+
// Revert after Qt bug is fixed
33+
// This compensates throwing a KeepassProxyAccessException in Connection#associate()
34+
Thread.sleep(10000L); // give me 10 seconds to enter a associate id
3135
assertTrue(null != kpa.getDatabasehash() && !kpa.getDatabasehash().isEmpty());
3236
assertTrue(kpa.testAssociate(kpa.getAssociateId(), kpa.getIdKeyPairPublicKey()));
3337
log.info("Please allow access to credentials");

0 commit comments

Comments
 (0)