My guess would be till we crash the servers or one week before release, whichever comes first. The BC2 demo launched a month before release and closed a week before, so it seems logical that they'd follow that pattern.
I'm estimating it will be 1-2 weeks at the most. BF3 comes out October 25th, so there's only about a month to do any tweaks on bugs and balancing that the Beta will show. They'll need some time to fix any problems the beta will weed out.