Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add tests for LoadDifferencesFromTable and stream-based change set creation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sessions |
Files: | files | file ages | folders |
SHA1: |
e3f513c15d19ca8553d31fddee4a6bdc |
User & Date: | mistachkin 2017-10-12 00:00:52.724 |
Context
2017-10-12
| ||
00:03 | Minor test cleanup. check-in: ac526d98e8 user: mistachkin tags: sessions | |
00:00 | Add tests for LoadDifferencesFromTable and stream-based change set creation. check-in: e3f513c15d user: mistachkin tags: sessions | |
2017-10-11
| ||
23:58 | Revise IDisposable semantics of the SQLiteStreamAdapter class: stop setting the contained (not owned) stream to null when disposed. check-in: 057f76abdc user: mistachkin tags: sessions | |
Changes
Changes to Tests/session.eagle.
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | - - - - - + + + + + | } return false } ############################################################################### |
︙ | |||
340 341 342 343 344 345 346 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - - + + - + + + + + + - + + - + - - + + + + + + + + + + + + + - + | setupDb [set fileName(0) session-1.1.db] set fileName(1) [getChangeSetFileName 1] set fileName(2) [getChangeSetFileName 2] cleanupSomeText } -body { |
︙ | |||
466 467 468 469 470 471 472 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | - + | ############################################################################### runTest {test session-1.3 {session enabled/disabled state} -setup { setupDb [set fileName session-1.3.db] cleanupSomeText } -body { |
︙ | |||
525 526 527 528 529 530 531 | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - + | ############################################################################### runTest {test session-1.4 {session direct/indirect state} -setup { setupDb [set fileName session-1.4.db] cleanupSomeText } -body { |
︙ | |||
583 584 585 586 587 588 589 | 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | - + | ############################################################################### runTest {test session-1.5 {session table filter} -setup { setupDb [set fileName session-1.5.db] cleanupSomeText } -body { |
︙ | |||
657 658 659 660 661 662 663 | 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 | - + | ############################################################################### runTest {test session-1.6 {combine and apply change sets} -setup { setupDb [set fileName session-1.6.db] cleanupSomeText } -body { |
︙ | |||
713 714 715 716 717 718 719 720 721 722 723 724 725 726 | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Echo"} NewValue 1 <nullObject> ConflictValue 1 <nullObject>} {TableName t1\ NumberOfColumns 2 OperationCode Insert Indirect False PrimaryKeyColumns {[True,\ False]} OldValue 0 <nullObject> NewValue 0 3 ConflictValue 0 <nullObject>\ OldValue 1 <nullObject> NewValue 1 {"inserted: Papa Quebec Romeo Sierra Tango"}\ ConflictValue 1 <nullObject>}} Data {1 {inserted: Kilo Lima Mike November\ Oscar} 2 {inserted: Foxtrot Golf Hotel India Juliet} 3 {inserted: Papa Quebec\ Romeo Sierra Tango}}}} ############################################################################### runTest {test session-1.7 {differences between tables} -setup { setupDb [set fileName session-1.7.db] cleanupSomeText } -body { createTheSchema $db main makeSomeChanges $db t1 [list insert insert] false set result [list] lappend result [sql execute -execute reader -format list $db \ {SELECT x, y FROM t1 ORDER BY x;}] createTheSchema $db temp sql execute $db {INSERT INTO temp.t1 SELECT * FROM main.t1;} makeSomeChanges $db temp.t1 [list insert insert] false set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null $session LoadDifferencesFromTable temp t1 lappend result [sql execute -execute reader -format list $db \ {SELECT x, y FROM t1 ORDER BY x;}] } -cleanup { cleanupSomeText unset -nocomplain result session freeDbConnection unset -nocomplain connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_SESSION_EXTENSION} -result {{1\ {inserted: Alpha Bravo Charlie Delta Echo} 2 {inserted: Foxtrot Golf Hotel\ India Juliet}} {1 {inserted: Alpha Bravo Charlie Delta Echo} 2 {inserted:\ Foxtrot Golf Hotel India Juliet} 3 {inserted: Kilo Lima Mike November Oscar} 4\ {inserted: Papa Quebec Romeo Sierra Tango}}}} ############################################################################### ############################################################################### rename conflictCallback "" rename tableFilterCallbackT1 "" rename createByteArray "" rename arrayToList "" |
︙ |