(t *testing.T)
| 633 | } |
| 634 | |
| 635 | func TestRenameReconciling(t *testing.T) { |
| 636 | adbidsPath, err := filepath.Abs("testruntime/testdata/ad_bids/data/AdBids.csv.gz") |
| 637 | require.NoError(t, err) |
| 638 | |
| 639 | rt, id := testruntime.NewInstance(t) |
| 640 | testruntime.PutFiles(t, rt, id, map[string]string{ |
| 641 | "/sources/foo.yaml": ` |
| 642 | connector: local_file |
| 643 | path: ` + adbidsPath, |
| 644 | }) |
| 645 | |
| 646 | // Trigger a reconcile, but don't wait for it to complete |
| 647 | ctrl, err := rt.Controller(context.Background(), id) |
| 648 | require.NoError(t, err) |
| 649 | err = ctrl.Reconcile(context.Background(), runtime.GlobalProjectParserName) |
| 650 | require.NoError(t, err) |
| 651 | |
| 652 | // Imperfect way to wait until the reconcile is in progress, but not completed (AdBids seems to take about 100ms to ingest). |
| 653 | // This seems good enough in practice, and if there's a bug, it will at least identify it some of the time! |
| 654 | time.Sleep(5 * time.Millisecond) |
| 655 | |
| 656 | // Rename the resource while the reconcile is still running |
| 657 | testruntime.RenameFile(t, rt, id, "/sources/foo.yaml", "/sources/bar.yaml") |
| 658 | |
| 659 | // Wait for it to complete and verify the output is stable |
| 660 | testruntime.ReconcileParserAndWait(t, rt, id) |
| 661 | testruntime.RequireReconcileState(t, rt, id, 2, 0, 0) |
| 662 | testruntime.RequireOLAPTable(t, rt, id, "bar") |
| 663 | } |
| 664 | |
| 665 | func TestInterdependence(t *testing.T) { |
| 666 | // Test D -> C, D -> A, C -> A,B (-> = refs) |
nothing calls this directly
no test coverage detected