@@ -64,6 +64,39 @@ public synchronized void testUndo() throws RevokingStoreIllegalStateException {
6464 Assert .assertTrue (revokingDatabase .getStack ().isEmpty ());
6565 Assert .assertTrue (tronDatabase .getDbSource ().allKeys ().isEmpty ());
6666 Assert .assertEquals (revokingDatabase .getActiveDialog (), 0 );
67+
68+ dialog = DialogOptional .instance ().setValue (revokingDatabase .buildDialog ());
69+ revokingDatabase .disable ();
70+ TestProtoCapsule testProtoCapsule = new TestProtoCapsule ("del" .getBytes ());
71+ tronDatabase .put (testProtoCapsule .getData (), testProtoCapsule );
72+ revokingDatabase .enable ();
73+
74+ try (Dialog tmpDialog = revokingDatabase .buildDialog ()) {
75+ tronDatabase .put (testProtoCapsule .getData (), new TestProtoCapsule ("del2" .getBytes ()));
76+ tmpDialog .merge ();
77+ }
78+
79+ try (Dialog tmpDialog = revokingDatabase .buildDialog ()) {
80+ tronDatabase .put (testProtoCapsule .getData (), new TestProtoCapsule ("del22" .getBytes ()));
81+ tmpDialog .merge ();
82+ }
83+
84+ try (Dialog tmpDialog = revokingDatabase .buildDialog ()) {
85+ tronDatabase .put (testProtoCapsule .getData (), new TestProtoCapsule ("del222" .getBytes ()));
86+ tmpDialog .merge ();
87+ }
88+
89+ try (Dialog tmpDialog = revokingDatabase .buildDialog ()) {
90+ tronDatabase .delete (testProtoCapsule .getData ());
91+ tmpDialog .merge ();
92+ }
93+
94+ dialog .reset ();
95+
96+ logger .info ("**********testProtoCapsule:" + String .valueOf (tronDatabase .get (testProtoCapsule .getData ())));
97+ Assert .assertArrayEquals ("del" .getBytes (), tronDatabase .get (testProtoCapsule .getData ()).getData ());
98+ Assert .assertEquals (testProtoCapsule , tronDatabase .get (testProtoCapsule .getData ()));
99+
67100 tronDatabase .close ();
68101 }
69102
0 commit comments